Commit acf5e120 authored by Michal Čihař's avatar Michal Čihař

Adjust tests for suggestions import

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 42d17da1
......@@ -337,7 +337,7 @@ class RegistrationTest(TestCase, RegistrationTestMixin):
)
user = User.objects.get(username='weblate')
self.assertEqual(user.first_name, 'Weblate')
self.assertEqual(user.email, 'noreply@weblate.org')
self.assertEqual(user.email, 'noreply-weblate@example.org')
class NoCookieRegistrationTest(RegistrationTest):
......
......@@ -533,11 +533,19 @@ class SuggesionCommandTest(RepoTestCase):
profile = Profile.objects.get(user__email=user.email)
self.assertEqual(profile.suggested, 1)
def test_default_user(self):
call_command(
'add_suggestions', 'test', 'test', 'cs', TEST_PO,
)
profile = Profile.objects.get(user__email='noreply@weblate.org')
self.assertEqual(profile.suggested, 1)
def test_missing_user(self):
self.assertRaises(
CommandError,
call_command,
'add_suggestions', 'test', 'test', 'cs', TEST_PO,
author='foo@example.org',
)
def test_missing_project(self):
......
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