How to Solve NameError: name 'assert_raises' is not defined -- nose

Solution: Import the 'assert_raises' module

# Add the following line to the top of your code
from nose.tools import assert_raises

 

For more information:
nose assert_raises