Changed raise AssertionError to assertIn

Solved bug #1403268
https://bugs.launchpad.net/horizon/+bug/1403268