From 104ae3f778484b9cf0f16e09208dba9e8ed788d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nov=C3=BD?= <github-lnovy@krtek.net> Date: Thu, 3 Sep 2015 11:47:34 +0000 Subject: [PATCH] Fix tests --- helios/tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helios/tests.py b/helios/tests.py index b3ed32a..ca9016c 100644 --- a/helios/tests.py +++ b/helios/tests.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ Unit Tests for Helios """ @@ -606,8 +607,8 @@ class ElectionBlackboxTests(WebTest): assert "your password" in email_message.subject, "bad subject in email" # get the username and password - username = re.search('voter ID: (.*)', email_message.body).group(1) - password = re.search('password: (.*)', email_message.body).group(1) + username = re.search(u'ID voliče: (.*)', email_message.body).group(1) + password = re.search(u'heslo: (.*)', email_message.body).group(1) # now log out as administrator self.clear_login() @@ -643,7 +644,7 @@ class ElectionBlackboxTests(WebTest): if need_login: if check_user_logged_in: - self.assertContains(cast_confirm_page, "You are logged in as") + self.assertContains(cast_confirm_page, "Jste přihlášeni jako") self.assertContains(cast_confirm_page, "requires election-specific credentials") # set the form @@ -659,7 +660,7 @@ class ElectionBlackboxTests(WebTest): # cast_confirm_page = cast_confirm_page.follow() else: # here we should be at the cast-confirm page and logged in - self.assertContains(cast_confirm_page, "CAST this ballot") + self.assertContains(cast_confirm_page, u"ODEVZDAT tento lístek") # confirm the vote, now with the actual form cast_form = cast_confirm_page.form -- GitLab