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

Test invalid file format handling as well

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 91d05f8c
...@@ -117,6 +117,19 @@ class TranslationAPITest(APIBaseTest): ...@@ -117,6 +117,19 @@ class TranslationAPITest(APIBaseTest):
response, 'Project-Id-Version: Weblate Hello World 2012' response, 'Project-Id-Version: Weblate Hello World 2012'
) )
def test_download_invalid_format(self):
args = {'format': 'invalid'}
args.update(self.translation_kwargs)
response = self.client.get(
reverse(
'api:translation-download',
kwargs=args
)
)
self.assertEqual(
response.status_code, 404
)
def test_download_format(self): def test_download_format(self):
args = {'format': 'xliff'} args = {'format': 'xliff'}
args.update(self.translation_kwargs) args.update(self.translation_kwargs)
......
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