You should be using assert_in (nose.tools.assert_in) here.