How to Solve NameError: name 'TestCase' is not defined -- unittest

Solution: Import the 'TestCase' module

To Solve the error, add the following line to the top of your code.

from unittest import TestCase

 

For more information:
Python unittest TestCase