How do I use unittest in Python?
Python’s unittest module, sometimes referred to as PyUnit, is based on the XUnit framework design by Kent Beck and Erich Gamma. The framework implemented by unittest enables automated testing for your code.
Test classes in unittest, consist of two parts: code to manage test “fixtures” and the test itself. Individual tests are created by subclassing TestCase and overriding or adding methods.
Refer this post to get Start with unittest in python