summaryrefslogtreecommitdiff
path: root/tests/invalid_models_tests
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2019-02-09 19:18:48 +0500
committerTim Graham <timograham@gmail.com>2019-02-09 09:18:48 -0500
commit1933e56eca1ad17de7dd133bfb7cbee9858a75a3 (patch)
tree3dbc7a8fa58cba631591ebdfa22c687948fbb887 /tests/invalid_models_tests
parentb1a2ad69251053a5f1ce71ffa95b188c4a765388 (diff)
Removed uneeded generator expressions and list comprehensions.
Diffstat (limited to 'tests/invalid_models_tests')
-rw-r--r--tests/invalid_models_tests/test_ordinary_fields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/invalid_models_tests/test_ordinary_fields.py b/tests/invalid_models_tests/test_ordinary_fields.py
index 9c7cf7f88c..a106ab175a 100644
--- a/tests/invalid_models_tests/test_ordinary_fields.py
+++ b/tests/invalid_models_tests/test_ordinary_fields.py
@@ -156,14 +156,14 @@ class CharFieldTests(SimpleTestCase):
self.display = display
def __iter__(self):
- return (x for x in [self.value, self.display])
+ return iter((self.value, self.display))
def __len__(self):
return 2
class Things:
def __iter__(self):
- return (x for x in [ThingItem(1, 2), ThingItem(3, 4)])
+ return iter((ThingItem(1, 2), ThingItem(3, 4)))
class ThingWithIterableChoices(models.Model):
thing = models.CharField(max_length=100, blank=True, choices=Things())