Commit 8bd1347b authored by Michal Čihař's avatar Michal Čihař

Properly create test users with mail

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 1bd51a78
......@@ -151,7 +151,7 @@ class BillingTest(TestCase):
)
self.assertEqual(302, response.status_code)
# Not owner
User.objects.create_user(username='foo', password='bar')
User.objects.create_user('foo', 'foo@example.org', 'bar')
self.client.login(username='foo', password='bar')
response = self.client.get(
reverse('invoice-download', kwargs={'pk': self.invoice.pk})
......
......@@ -521,7 +521,7 @@ class SuggesionCommandTest(RepoTestCase):
def test_add_suggestions(self):
user = User.objects.create_user(
'testuser',
'noreply@weblate.org',
'weblate@example.org',
'testpassword'
)
call_command(
......
......@@ -37,7 +37,7 @@ from weblate.trans.tests.test_models import ModelTestCase
class PermissionsTest(TestCase):
def setUp(self):
self.user = User.objects.create_user('user', 'test@example.com', 'x')
self.owner = User.objects.create_user('owner', 'test@example.com', 'x')
self.owner = User.objects.create_user('owner', 'owner@example.com', 'x')
self.owner.groups.add(Group.objects.get(name='Owners'))
self.project = Project.objects.create(slug='test')
self.project.owners.add(self.owner)
......@@ -93,8 +93,10 @@ class GroupACLTest(ModelTestCase):
def setUp(self):
super(GroupACLTest, self).setUp()
self.user = User.objects.create("user", 'test@example.com', 'x')
self.privileged = User.objects.create(
self.user = User.objects.create_user(
"user", 'test@example.com', 'x'
)
self.privileged = User.objects.create_user(
"privileged", 'other@example.com', 'x'
)
self.group = Group.objects.create(name="testgroup")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment