Refs #25745 -- Isolated an order_with_respect_to test.

This commit is contained in:
Simon Charette 2015-11-09 14:13:23 -05:00
parent e9673c657a
commit 406de4c243
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ from __future__ import unicode_literals
from operator import attrgetter from operator import attrgetter
from django.apps.registry import Apps
from django.db import models from django.db import models
from django.test import TestCase from django.test import TestCase
@ -95,9 +96,11 @@ class OrderWithRespectToTests2(TestCase):
self.assertSequenceEqual(p1.get_post_order(), [p1_1.pk, p1_2.pk, p1_3.pk]) self.assertSequenceEqual(p1.get_post_order(), [p1_1.pk, p1_2.pk, p1_3.pk])
def test_duplicate_order_field(self): def test_duplicate_order_field(self):
test_apps = Apps(['order_with_respect_to'])
class Bar(models.Model): class Bar(models.Model):
class Meta: class Meta:
apps = test_apps
app_label = 'order_with_respect_to' app_label = 'order_with_respect_to'
class Foo(models.Model): class Foo(models.Model):
@ -106,6 +109,7 @@ class OrderWithRespectToTests2(TestCase):
class Meta: class Meta:
order_with_respect_to = 'bar' order_with_respect_to = 'bar'
apps = test_apps
app_label = 'order_with_respect_to' app_label = 'order_with_respect_to'
count = 0 count = 0