summaryrefslogtreecommitdiff
path: root/tests/order_with_respect_to
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2015-11-17 00:39:28 -0500
committerSimon Charette <charette.s@gmail.com>2016-01-06 20:00:07 -0500
commita08fda2111d811aa53f11218fa03f3300dfff4cb (patch)
tree0263cf99adf17c5123b3a53c686f637d5b40eda4 /tests/order_with_respect_to
parent3096f4b0829a005c67a14cc4bb6d345aa32672a1 (diff)
downloaddjango-a08fda2111d811aa53f11218fa03f3300dfff4cb.tar.gz
Fixed #25746 -- Isolated inlined test models registration.
Thanks to Tim for the review.
Diffstat (limited to 'tests/order_with_respect_to')
-rw-r--r--tests/order_with_respect_to/tests.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/order_with_respect_to/tests.py b/tests/order_with_respect_to/tests.py
index c22f9b4ea4..7788fe3368 100644
--- a/tests/order_with_respect_to/tests.py
+++ b/tests/order_with_respect_to/tests.py
@@ -2,9 +2,9 @@ from __future__ import unicode_literals
from operator import attrgetter
-from django.apps.registry import Apps
from django.db import models
from django.test import TestCase
+from django.test.utils import isolate_apps
from .base_tests import BaseOrderWithRespectToTests
from .models import Answer, Dimension, Entity, Post, Question
@@ -18,12 +18,10 @@ class OrderWithRespectToBaseTests(BaseOrderWithRespectToTests, TestCase):
class OrderWithRespectToTests(TestCase):
+ @isolate_apps('order_with_respect_to')
def test_duplicate_order_field(self):
- test_apps = Apps(['order_with_respect_to'])
-
class Bar(models.Model):
class Meta:
- apps = test_apps
app_label = 'order_with_respect_to'
class Foo(models.Model):
@@ -32,7 +30,6 @@ class OrderWithRespectToTests(TestCase):
class Meta:
order_with_respect_to = 'bar'
- apps = test_apps
app_label = 'order_with_respect_to'
count = 0