summaryrefslogtreecommitdiff
path: root/tests/select_related_regress
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-10-23 06:09:29 -0400
committerTim Graham <timograham@gmail.com>2013-10-23 06:09:29 -0400
commitae48d77ef8e14dae76fddcd5a677b897c7c7c4ae (patch)
treefc938daf79b1061aeb70c9d7dd33108d2eb63544 /tests/select_related_regress
parent51d2e1fb233b5507bf14300787939717c4d93834 (diff)
downloaddjango-ae48d77ef8e14dae76fddcd5a677b897c7c7c4ae.tar.gz
Fixed E225 pep8 warnings.
Diffstat (limited to 'tests/select_related_regress')
-rw-r--r--tests/select_related_regress/tests.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/select_related_regress/tests.py b/tests/select_related_regress/tests.py
index 59f4c0d94e..6619105069 100644
--- a/tests/select_related_regress/tests.py
+++ b/tests/select_related_regress/tests.py
@@ -23,21 +23,21 @@ class SelectRelatedRegressTests(TestCase):
and include some unnecessary bonus joins).
"""
- b=Building.objects.create(name='101')
- dev1=Device.objects.create(name="router", building=b)
- dev2=Device.objects.create(name="switch", building=b)
- dev3=Device.objects.create(name="server", building=b)
- port1=Port.objects.create(port_number='4',device=dev1)
- port2=Port.objects.create(port_number='7',device=dev2)
- port3=Port.objects.create(port_number='1',device=dev3)
- c1=Connection.objects.create(start=port1, end=port2)
- c2=Connection.objects.create(start=port2, end=port3)
-
- connections=Connection.objects.filter(start__device__building=b, end__device__building=b).order_by('id')
+ b = Building.objects.create(name='101')
+ dev1 = Device.objects.create(name="router", building=b)
+ dev2 = Device.objects.create(name="switch", building=b)
+ dev3 = Device.objects.create(name="server", building=b)
+ port1 = Port.objects.create(port_number='4',device=dev1)
+ port2 = Port.objects.create(port_number='7',device=dev2)
+ port3 = Port.objects.create(port_number='1',device=dev3)
+ c1 = Connection.objects.create(start=port1, end=port2)
+ c2 = Connection.objects.create(start=port2, end=port3)
+
+ connections = Connection.objects.filter(start__device__building=b, end__device__building=b).order_by('id')
self.assertEqual([(c.id, six.text_type(c.start), six.text_type(c.end)) for c in connections],
[(c1.id, 'router/4', 'switch/7'), (c2.id, 'switch/7', 'server/1')])
- connections=Connection.objects.filter(start__device__building=b, end__device__building=b).select_related().order_by('id')
+ connections = Connection.objects.filter(start__device__building=b, end__device__building=b).select_related().order_by('id')
self.assertEqual([(c.id, six.text_type(c.start), six.text_type(c.end)) for c in connections],
[(c1.id, 'router/4', 'switch/7'), (c2.id, 'switch/7', 'server/1')])