If you got the problem like what I mention on the title, that’s mean you need to take a rest. Why? The big possibilty is sometimes we forgot to add “test” as prefix on our testCase method. For instance:
1 2 3 4 5 6 7 8 | class InsuranceTestCase(TestCase): """Insurance unit-testing""" def setUp(self): pass def check_whether_user_valid(self): pass |
When you running this unit-test, Django will give result 0 test has been executed. So, the correct way is :
1 2 3 4 5 6 7 8 | class InsuranceTestCase(TestCase): """Insurance unit-testing""" def setUp(self): pass def test_check_whether_user_valid(self): pass |
Simple! 🙂