diff options
Diffstat (limited to 'docs/internals/contributing/writing-code/unit-tests.txt')
| -rw-r--r-- | docs/internals/contributing/writing-code/unit-tests.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 8789e0ef7b..40fb2ec221 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -537,11 +537,13 @@ a temporary ``Apps`` instance. To do this, use the from django.test import SimpleTestCase from django.test.utils import isolate_apps + class TestModelDefinition(SimpleTestCase): - @isolate_apps('app_label') + @isolate_apps("app_label") def test_model_definition(self): class TestModel(models.Model): pass + ... .. admonition:: Setting ``app_label`` @@ -561,8 +563,9 @@ a temporary ``Apps`` instance. To do this, use the from django.test import SimpleTestCase from django.test.utils import isolate_apps + class TestModelDefinition(SimpleTestCase): - @isolate_apps('app_label', 'other_app_label') + @isolate_apps("app_label", "other_app_label") def test_model_definition(self): # This model automatically receives app_label='app_label' class TestModel(models.Model): @@ -570,5 +573,6 @@ a temporary ``Apps`` instance. To do this, use the class OtherAppModel(models.Model): class Meta: - app_label = 'other_app_label' + app_label = "other_app_label" + ... |
