mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f68fa8b45d
commit
9c19aff7c7
@@ -15,20 +15,19 @@ class OrderWithRespectToBaseTests(BaseOrderWithRespectToTests, TestCase):
|
||||
|
||||
|
||||
class OrderWithRespectToTests(SimpleTestCase):
|
||||
|
||||
@isolate_apps('order_with_respect_to')
|
||||
@isolate_apps("order_with_respect_to")
|
||||
def test_duplicate_order_field(self):
|
||||
class Bar(models.Model):
|
||||
class Meta:
|
||||
app_label = 'order_with_respect_to'
|
||||
app_label = "order_with_respect_to"
|
||||
|
||||
class Foo(models.Model):
|
||||
bar = models.ForeignKey(Bar, models.CASCADE)
|
||||
order = models.OrderWrt()
|
||||
|
||||
class Meta:
|
||||
order_with_respect_to = 'bar'
|
||||
app_label = 'order_with_respect_to'
|
||||
order_with_respect_to = "bar"
|
||||
app_label = "order_with_respect_to"
|
||||
|
||||
count = 0
|
||||
for field in Foo._meta.local_fields:
|
||||
@@ -45,4 +44,6 @@ class TestOrderWithRespectToOneToOnePK(TestCase):
|
||||
c1 = d.component_set.create()
|
||||
c2 = d.component_set.create()
|
||||
d.set_component_order([c1.id, c2.id])
|
||||
self.assertQuerysetEqual(d.component_set.all(), [c1.id, c2.id], attrgetter('pk'))
|
||||
self.assertQuerysetEqual(
|
||||
d.component_set.all(), [c1.id, c2.id], attrgetter("pk")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user