Cannot start django tests by tag

I have a problem because I wanted to tag some test in django, but when I type the console

from django.test import tag, TestCase


@tag('fast', 'something')
class SomeTestCase(TestCase):
    def setUp(self):
        # do something

    def test_something(self):
        # do something

when I type the console:

./manage.py test --tag=fast -k

I got:

Using existing test database for alias 'default'...
System check identified no issues (0 silenced).

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
Preserving test database for alias 'default'...

Example module structure:

├── admin.py
├── __init__.py
├── migrations
├── models.py
├── tests
│   ├── __init__.py
│   ├── tests.py
│   └── test_views.py
├── urls.py
└── views.py
+4
source share

Source: https://habr.com/ru/post/1678760/


All Articles