Commit 07ad699c authored by Michal Čihař's avatar Michal Čihař

Test for new error messages

parent 026782b5
...@@ -37,31 +37,31 @@ class ChangesTest(ViewTestCase): ...@@ -37,31 +37,31 @@ class ChangesTest(ViewTestCase):
{'project': 'test'} {'project': 'test'}
) )
self.assertContains(response, 'Resource update') self.assertContains(response, 'Resource update')
self.assertNotContains(response, 'Invalid search string!') self.assertNotContains(response, 'Failed to find matching project!')
response = self.client.get( response = self.client.get(
reverse('changes'), reverse('changes'),
{'project': 'test', 'subproject': 'test'} {'project': 'test', 'subproject': 'test'}
) )
self.assertContains(response, 'Resource update') self.assertContains(response, 'Resource update')
self.assertNotContains(response, 'Invalid search string!') self.assertNotContains(response, 'Failed to find matching project!')
response = self.client.get( response = self.client.get(
reverse('changes'), reverse('changes'),
{'project': 'test', 'subproject': 'test', 'lang': 'cs'} {'project': 'test', 'subproject': 'test', 'lang': 'cs'}
) )
self.assertContains(response, 'Resource update') self.assertContains(response, 'Resource update')
self.assertNotContains(response, 'Invalid search string!') self.assertNotContains(response, 'Failed to find matching project!')
response = self.client.get( response = self.client.get(
reverse('changes'), reverse('changes'),
{'lang': 'cs'} {'lang': 'cs'}
) )
self.assertContains(response, 'Resource update') self.assertContains(response, 'Resource update')
self.assertNotContains(response, 'Invalid search string!') self.assertNotContains(response, 'Failed to find matching language!')
response = self.client.get( response = self.client.get(
reverse('changes'), reverse('changes'),
{'project': 'testx', 'subproject': 'test', 'lang': 'cs'} {'project': 'testx', 'subproject': 'test', 'lang': 'cs'}
) )
self.assertContains(response, 'Resource update') self.assertContains(response, 'Resource update')
self.assertContains(response, 'Invalid search string!') self.assertContains(response, 'Failed to find matching project!')
def test_user(self): def test_user(self):
self.edit_unit( self.edit_unit(
......
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