Move other asserts outside assertRaises