Context manager form is nicer:
```python
with self.assertRaises(tabs.InvalidTabsException):
    checker = tabs.key_checker(self.invalid_keys)
    checker(self.dict_value)
```