diff options
| author | Tim Graham <timograham@gmail.com> | 2016-02-19 14:13:54 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-02-19 14:21:00 -0500 |
| commit | 032f5a789692d69ab206f902867ff2c3e05c5320 (patch) | |
| tree | 834029528fc6d4bdfb3f480eaf870f5e166d5b22 | |
| parent | 375e1cfe2b2e1c3c57f882147c34902c6e8189ac (diff) | |
Refs #25735 -- Made @tag decorator importable from django.test.
| -rw-r--r-- | django/test/__init__.py | 4 | ||||
| -rw-r--r-- | docs/topics/testing/tools.txt | 2 | ||||
| -rw-r--r-- | tests/test_discovery_sample/tests_sample.py | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/django/test/__init__.py b/django/test/__init__.py index 7ba1e7f282..63baf87534 100644 --- a/django/test/__init__.py +++ b/django/test/__init__.py @@ -9,14 +9,14 @@ from django.test.testcases import ( ) from django.test.utils import ( ignore_warnings, modify_settings, override_settings, - override_system_checks, + override_system_checks, tag, ) __all__ = [ 'Client', 'RequestFactory', 'TestCase', 'TransactionTestCase', 'SimpleTestCase', 'LiveServerTestCase', 'skipIfDBFeature', 'skipUnlessAnyDBFeature', 'skipUnlessDBFeature', 'ignore_warnings', - 'modify_settings', 'override_settings', 'override_system_checks' + 'modify_settings', 'override_settings', 'override_system_checks', 'tag', ] # To simplify Django's test suite; not meant as a public API diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index de008bd325..a2519da64d 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1632,7 +1632,7 @@ Tagging tests You can tag your tests so you can easily run a particular subset. For example, you might label fast or slow tests:: - from django.test.utils import tag + from django.test import tag class SampleTestCase(TestCase): diff --git a/tests/test_discovery_sample/tests_sample.py b/tests/test_discovery_sample/tests_sample.py index 53588709ea..694b01ffd4 100644 --- a/tests/test_discovery_sample/tests_sample.py +++ b/tests/test_discovery_sample/tests_sample.py @@ -1,8 +1,7 @@ import doctest from unittest import TestCase -from django.test import SimpleTestCase, TestCase as DjangoTestCase -from django.test.utils import tag +from django.test import SimpleTestCase, TestCase as DjangoTestCase, tag from . import doctests |
