diff options
| author | django-bot <ops@djangoproject.com> | 2023-03-01 13:35:43 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-01 13:39:03 +0100 |
| commit | 62510f01e76ad0526c94ea6d1bc6399c1ddf3df4 (patch) | |
| tree | 79844be246eba809a4ca09c6f4c3448f2276321a /docs/internals/contributing/writing-code/unit-tests.txt | |
| parent | 32f224e359c68e70e3f9a230be0265dcd6677079 (diff) | |
[4.2.x] Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.
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 12c9dae8c7..7411e3715c 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -532,11 +532,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`` @@ -556,8 +558,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): @@ -565,5 +568,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" + ... |
