diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-10-06 17:05:11 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-10-06 17:05:11 -0400 |
commit | 0e07bd3058ca5316329840225fd5a1977749361a (patch) | |
tree | f79657d4be76b2c351d18ea2621b8fe4a9403332 | |
parent | 0346b0b0741e1e006e06a3df3cdf86bffe68c7da (diff) | |
download | askbot-0e07bd3058ca5316329840225fd5a1977749361a.tar.gz askbot-0e07bd3058ca5316329840225fd5a1977749361a.tar.bz2 askbot-0e07bd3058ca5316329840225fd5a1977749361a.zip |
added test case for a unicode question
-rw-r--r-- | askbot/tests/db_api_tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 = '', |