How to Solve NameError: name 'unittest2' is not defined

Solution: Import the 'unittest2' module

# Add the following line to the top of your code
import unittest2

 

For more information:
Python unittest2