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
58ff601c
Commit
58ff601c
authored
Feb 14, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Need to open files as binary
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
075fb3ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
weblate/trans/tests/test_files.py
weblate/trans/tests/test_files.py
+3
-3
No files found.
weblate/trans/tests/test_files.py
View file @
58ff601c
...
...
@@ -60,7 +60,7 @@ class ImportBaseTest(ViewTestCase):
if
test_file
is
None
:
test_file
=
self
.
test_file
with
open
(
test_file
)
as
handle
:
with
open
(
test_file
,
'rb'
)
as
handle
:
params
=
{
'file'
:
handle
}
params
.
update
(
kwargs
)
return
self
.
client
.
post
(
...
...
@@ -311,7 +311,7 @@ class AndroidImportTest(ViewTestCase):
return
self
.
create_android
()
def
test_import
(
self
):
with
open
(
TEST_ANDROID
)
as
handle
:
with
open
(
TEST_ANDROID
,
'rb'
)
as
handle
:
self
.
client
.
post
(
reverse
(
'upload_translation'
,
...
...
@@ -331,7 +331,7 @@ class CSVImportTest(ViewTestCase):
translation
=
self
.
get_translation
()
self
.
assertEqual
(
translation
.
translated
,
0
)
self
.
assertEqual
(
translation
.
fuzzy
,
0
)
with
open
(
TEST_CSV
)
as
handle
:
with
open
(
TEST_CSV
,
'rb'
)
as
handle
:
self
.
client
.
post
(
reverse
(
'upload_translation'
,
...
...
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