Skip to content

Commit

Permalink
tests: i18n_tool needs to read mo files in binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Loic Dachary committed Mar 26, 2018
1 parent 014a496 commit af0186f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions securedrop/tests/test_i18n_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_translate_messages_l10n(self, tmpdir):
assert not exists(mo_file)
i18n_tool.I18NTool().main(args)
assert exists(mo_file)
with io.open(mo_file) as fobj:
with io.open(mo_file, mode='rb') as fobj:
mo = fobj.read()
assert 'code hello i18n' in mo
assert 'template hello i18n' in mo
Expand Down Expand Up @@ -218,7 +218,7 @@ def test_translate_messages_compile_arg(self, tmpdir):
'--compile',
])
assert old_po_mtime == getmtime(po_file)
with io.open(mo_file) as fobj:
with io.open(mo_file, mode='rb') as fobj:
mo = fobj.read()
assert 'code hello i18n' in mo
assert 'template hello i18n' not in mo
Expand Down

0 comments on commit af0186f

Please sign in to comment.