According to pytest tests , your class should start with Test which will be automatically selected by the test detection engine. TestRegisterNewInstructor this name it TestRegisterNewInstructor .
Or subclasses of unittest.TestCase :
import unittest class RegisterNewInstructor(unittest.TestCase):
Also keep in mind that the .py test script itself should start with test_ in its file name.
source share