diff --git a/tests/model_inheritance_same_model_name/models.py b/tests/model_inheritance_same_model_name/models.py
index a8c051f..eef4a7f 100644
a
|
b
|
in the need for an %(app_label)s format string. This app specifically tests
|
6 | 6 | this feature by redefining the Copy model from model_inheritance/models.py |
7 | 7 | """ |
8 | 8 | |
| 9 | from django.conf import settings |
9 | 10 | from django.db import models |
10 | 11 | |
11 | 12 | from model_inheritance.models import NamedURL |
12 | 13 | from django.utils.encoding import python_2_unicode_compatible |
13 | 14 | |
14 | 15 | |
15 | | # |
16 | | # Abstract base classes with related models |
17 | | # |
18 | | @python_2_unicode_compatible |
19 | | class Copy(NamedURL): |
20 | | content = models.TextField() |
| 16 | if 'model_inheritance' in settings.INSTALLED_APPS: |
| 17 | # |
| 18 | # Abstract base classes with related models |
| 19 | # |
| 20 | @python_2_unicode_compatible |
| 21 | class Copy(NamedURL): |
| 22 | content = models.TextField() |
21 | 23 | |
22 | | def __str__(self): |
23 | | return self.content |
| 24 | def __str__(self): |
| 25 | return selfself.content |
diff --git a/tests/model_inheritance_same_model_name/tests.py b/tests/model_inheritance_same_model_name/tests.py
index fe1fb0c..ea88c39 100644
a
|
b
|
|
1 | 1 | from __future__ import unicode_literals |
2 | 2 | |
| 3 | from unittest import skipUnless |
| 4 | |
| 5 | from django.conf import settings |
3 | 6 | from django.test import TestCase |
4 | 7 | |
5 | 8 | from model_inheritance.models import Title |
6 | 9 | |
7 | 10 | |
| 11 | @skipUnless('model_inheritance' in settings.INSTALLED_APPS, |
| 12 | "model_inheritance must be installed to run these tests.") |
8 | 13 | class InheritanceSameModelNameTests(TestCase): |
9 | 14 | |
10 | 15 | def setUp(self): |