Split "test_exception" to 2 tests.

It's not recommended to switch assertions according to a certain
condition.