diff --git a/tests.py b/tests.py index b7d4af5..2f86472 100644 --- a/tests.py +++ b/tests.py @@ -12,19 +12,22 @@ class AttributiveTranslationsTest(TestCase): + def setUp(self): + empty_mo_file.seek(0) + def test_value_returned_is_userstring(self): value_returned = AttributiveTranslations(empty_mo_file).gettext('foo') self.assertIsInstance(value_returned, UserString) def test_is_attributive(self): - t = AttributiveTranslations() + t = AttributiveTranslations(empty_mo_file) t._catalog = {'attribute\x04foo': 'bar'} foo = t.gettext('foo') self.assertEqual('bar', foo.attribute) def test_fallbacks(self): - t = AttributiveTranslations() + t = AttributiveTranslations(empty_mo_file) t._catalog = {'user': 'użytkownik'} message = t.gettext('user')