diff options
| author | userimack <mahendra.k12@gmail.com> | 2016-01-23 22:17:07 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-25 14:23:43 -0500 |
| commit | 60586dd7379b295b72d8af4e03423c286913b5e8 (patch) | |
| tree | 6f834957ea76305fbcda40e23e836077890d36b8 /tests/model_meta | |
| parent | abc0777b63057e2ff97eee2ff184356051e14c47 (diff) | |
Fixed #26125 -- Fixed E731 flake warnings.
Diffstat (limited to 'tests/model_meta')
| -rw-r--r-- | tests/model_meta/tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/model_meta/tests.py b/tests/model_meta/tests.py index 1dbfca0c8e..cfae4736fa 100644 --- a/tests/model_meta/tests.py +++ b/tests/model_meta/tests.py @@ -68,7 +68,8 @@ class DataTests(OptionsBaseTests): self.assertEqual([f.attname for f in fields], expected_result) def test_local_fields(self): - is_data_field = lambda f: isinstance(f, Field) and not isinstance(f, related.ManyToManyField) + def is_data_field(f): + return isinstance(f, Field) and not isinstance(f, related.ManyToManyField) for model, expected_result in TEST_RESULTS['local_fields'].items(): fields = model._meta.local_fields @@ -101,7 +102,8 @@ class M2MTests(OptionsBaseTests): class RelatedObjectsTests(OptionsBaseTests): - key_name = lambda self, r: r[0] + def key_name(self, r): + return r[0] def test_related_objects(self): result_key = 'get_all_related_objects_with_model' |
