Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
a581a480
Commit
a581a480
authored
Mar 24, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test invalid file format handling as well
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
91d05f8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
weblate/api/tests.py
weblate/api/tests.py
+13
-0
No files found.
weblate/api/tests.py
View file @
a581a480
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment