summaryrefslogtreecommitdiff
path: root/docs/internals/contributing/writing-code/unit-tests.txt
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2023-03-01 13:35:43 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-01 13:39:03 +0100
commit62510f01e76ad0526c94ea6d1bc6399c1ddf3df4 (patch)
tree79844be246eba809a4ca09c6f4c3448f2276321a /docs/internals/contributing/writing-code/unit-tests.txt
parent32f224e359c68e70e3f9a230be0265dcd6677079 (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.txt10
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"
+
...