you can try like that.
try:
self.assertRaises(None,function,arg1, arg2)
except:
pass
if you don't put code inside try block it will through exception' AssertionError: None not raised " and test case will be failed. Test case will be pass if put inside try block which is expected behaviour.