Switch more strings to unicode.

This commit is contained in:
Arik Fraimovich 2018-08-05 17:58:29 +03:00
parent 2e08d8deb4
commit e4dba1ca8e
2 changed files with 4 additions and 4 deletions

View File

@ -23,8 +23,8 @@ class TestUserUpdateGroupAssignments(BaseTestCase):
class TestUserFindByEmail(BaseTestCase):
def test_finds_users(self):
user = self.factory.create_user(email='test@example.com')
user2 = self.factory.create_user(email='test@example.com', org=self.factory.create_org())
user = self.factory.create_user(email=u'test@example.com')
user2 = self.factory.create_user(email=u'test@example.com', org=self.factory.create_org())
users = User.find_by_email(user.email)
self.assertIn(user, users)

View File

@ -314,10 +314,10 @@ class UserCommandTests(BaseTestCase):
self.assertEqual(u.group_ids, [u.org.default_group.id])
def test_create_bad(self):
self.factory.create_user(email='foobar@example.com')
self.factory.create_user(email=u'foobar@example.com')
runner = CliRunner()
result = runner.invoke(
manager, ['users', 'create', 'foobar@example.com', 'Fred Foobar'],
manager, ['users', 'create', u'foobar@example.com', 'Fred Foobar'],
input="password1\npassword1\n")
self.assertTrue(result.exception)
self.assertEqual(result.exit_code, 1)