Fix a codec issue in Py3

This commit is contained in:
Jannis Leidel 2016-09-20 11:20:34 +02:00
parent 7454e109ea
commit 39c8420511

View file

@ -124,7 +124,7 @@ class DbTemplatesTestCase(TestCase):
call_command('sync_templates', force=True,
verbosity=0, overwrite=DATABASE_TO_FILES)
self.assertTrue(
'modified' in codecs.open(temp_template_path).read())
'modified' in codecs.open(temp_template_path, 'utf-8').read().decode('utf-8'))
call_command('sync_templates', force=True, verbosity=0,
delete=True, overwrite=DATABASE_TO_FILES)