From afe186add4b0ca02eb0f9dea6ead0c721eab4f96 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 7 Sep 2013 15:19:03 +0200 Subject: [PATCH] Fixed repr in widget --- openslides/projector/projector.py | 2 +- tests/projector/test_widgets.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openslides/projector/projector.py b/openslides/projector/projector.py index d9823b44f..ee72456cd 100644 --- a/openslides/projector/projector.py +++ b/openslides/projector/projector.py @@ -146,7 +146,7 @@ class Widget(object): return self.display_name def __repr__(self): - return unicode(self.display_name) + return repr(self.display_name) def __unicode__(self): return unicode(self.display_name) diff --git a/tests/projector/test_widgets.py b/tests/projector/test_widgets.py index 30f5100f0..f0bdcb9f4 100644 --- a/tests/projector/test_widgets.py +++ b/tests/projector/test_widgets.py @@ -21,3 +21,7 @@ class WidgetObject(TestCase): def test_error(self): with self.assertRaises(OpenSlidesError): w = Widget(HttpRequest(), name='chahghuyeim8ie0Noong') + + def test_repr(self): + w = Widget(HttpRequest(), name='abcdefgäöüß', html='html') + self.assertEqual(repr(w), repr('Abcdefgäöüß'))