From 0e07bd3058ca5316329840225fd5a1977749361a Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 6 Oct 2012 17:05:11 -0400 Subject: added test case for a unicode question --- askbot/tests/db_api_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/askbot/tests/db_api_tests.py b/askbot/tests/db_api_tests.py index 25a2407f..84cd7acb 100644 --- a/askbot/tests/db_api_tests.py +++ b/askbot/tests/db_api_tests.py @@ -88,6 +88,14 @@ class DBApiTests(AskbotTestCase): rev = q.revisions.all()[0] self.assertTrue(rev.is_anonymous) + def tets_post_unicode_question(self): + """there was a bug that caused this to raise a db error""" + self.user.post_question( + tags=u'\u043c\u043e\u0440\u0435', + body_text=u'\u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0440\u0435 \u0441\u0438\u043d\u0435\u0435? \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u0435\u0435 \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0434\u043d\u043e.', + title=u'\u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0440\u0435 \u0441\u0438\u043d\u0435\u0435?' + ) + def test_post_bodyless_question(self): q = self.user.post_question( body_text = '', -- cgit v1.2.3-1-g7c22