Тесты на исключения выглядят так:

```python
try:
    action_that_should_raise()
except ExceptionType:
    # ALL GOOD
else:
    # action did not raise exception, test fails
    raise AssertionError("action_that_should_raise did not raise exc")
```