[Django]-Django `manage.py test` ignores some tests

6👍

The tests you want to run, should start with the word test:

def test_create_project(self)

etc…

https://docs.python.org/2/library/unittest.html#basic-example

The three individual tests are defined with methods whose names start with the letters test. This naming convention informs the test runner about which methods represent tests.

Django docs:
https://docs.djangoproject.com/en/1.9/topics/testing/overview/#writing-tests

When you run your tests, the default behavior of the test utility is to find all the test cases (that is, subclasses of unittest.TestCase) in any file whose name begins with test, automatically build a test suite out of those test cases, and run that suite.

Leave a comment