Re-format all files

This commit is contained in:
Swen Kooij
2019-10-19 12:43:17 +03:00
parent 4ee1a5f487
commit 7cdd1f4490
41 changed files with 836 additions and 812 deletions

View File

@@ -17,17 +17,12 @@ class LocalizedModelTestCase(TestCase):
super(LocalizedModelTestCase, cls).setUpClass()
cls.TestModel = get_fake_model(
{
'title': LocalizedField()
}
)
cls.TestModel = get_fake_model({"title": LocalizedField()})
@classmethod
def test_defaults(cls):
"""Tests whether all :see:LocalizedField
fields are assigned an empty :see:LocalizedValue
instance when the model is instanitiated."""
"""Tests whether all :see:LocalizedField fields are assigned an empty
:see:LocalizedValue instance when the model is instanitiated."""
obj = cls.TestModel()
@@ -35,19 +30,18 @@ class LocalizedModelTestCase(TestCase):
@classmethod
def test_model_init_kwargs(cls):
"""Tests whether all :see:LocalizedField
fields are assigned an empty :see:LocalizedValue
instance when the model is instanitiated."""
"""Tests whether all :see:LocalizedField fields are assigned an empty
:see:LocalizedValue instance when the model is instanitiated."""
data = {
'title': {
'en': 'english_title',
'ro': 'romanian_title',
'nl': 'dutch_title'
"title": {
"en": "english_title",
"ro": "romanian_title",
"nl": "dutch_title",
}
}
obj = cls.TestModel(**data)
assert isinstance(obj.title, LocalizedValue)
assert obj.title.en == 'english_title'
assert obj.title.ro == 'romanian_title'
assert obj.title.nl == 'dutch_title'
assert obj.title.en == "english_title"
assert obj.title.ro == "romanian_title"
assert obj.title.nl == "dutch_title"