Merge pull request #870 from ostcar/fixed_repr_in_widget
Fixed repr in widget
This commit is contained in:
commit
00c341fc86
@ -146,7 +146,7 @@ class Widget(object):
|
|||||||
return self.display_name
|
return self.display_name
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return unicode(self.display_name)
|
return repr(self.display_name)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return unicode(self.display_name)
|
return unicode(self.display_name)
|
||||||
|
@ -21,3 +21,7 @@ class WidgetObject(TestCase):
|
|||||||
def test_error(self):
|
def test_error(self):
|
||||||
with self.assertRaises(OpenSlidesError):
|
with self.assertRaises(OpenSlidesError):
|
||||||
w = Widget(HttpRequest(), name='chahghuyeim8ie0Noong')
|
w = Widget(HttpRequest(), name='chahghuyeim8ie0Noong')
|
||||||
|
|
||||||
|
def test_repr(self):
|
||||||
|
w = Widget(HttpRequest(), name='abcdefgäöüß', html='<strong>html</strong>')
|
||||||
|
self.assertEqual(repr(w), repr('Abcdefgäöüß'))
|
||||||
|
Loading…
Reference in New Issue
Block a user