This `assertRaises` method is pretty confusing, you should use:

```python
with self.assertRaises(TypeError):
```