diff options
| author | django-bot <ops@djangoproject.com> | 2023-02-28 20:53:28 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-01 13:03:56 +0100 |
| commit | 14459f80ee3a9e005989db37c26fd13bb6d2fab2 (patch) | |
| tree | eb62429ed696ed3a5389f3a676aecfc6d15a99cc /docs/internals/contributing/writing-code/unit-tests.txt | |
| parent | 6015bab80e28aef2669f6fac53423aa65f70cb08 (diff) | |
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 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" + ... |
