diff options
Diffstat (limited to 'tests/test_exceptions.py')
| -rw-r--r-- | tests/test_exceptions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 3e3dc9f..2efe2b2 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | import adblock | 1 | import adblock |
| 2 | import pytest | 2 | import pytest |
| 3 | 3 | ||
| 4 | |||
| 4 | def test_correct_baseclasses(): | 5 | def test_correct_baseclasses(): |
| 5 | assert issubclass(adblock.AdblockException, Exception) | 6 | assert issubclass(adblock.AdblockException, Exception) |
| 6 | assert issubclass(adblock.BlockerException, adblock.AdblockException) | 7 | assert issubclass(adblock.BlockerException, adblock.AdblockException) |
| @@ -17,6 +18,6 @@ def test_add_resource_error(): | |||
| 17 | engine = adblock.Engine(filter_set=filter_set) | 18 | engine = adblock.Engine(filter_set=filter_set) |
| 18 | 19 | ||
| 19 | with pytest.raises(adblock.AddResourceError) as exc: | 20 | with pytest.raises(adblock.AddResourceError) as exc: |
| 20 | engine.add_resource(name='aa', content_type="image/jpeg", content="111") | 21 | engine.add_resource(name="aa", content_type="image/jpeg", content="111") |
| 21 | 22 | ||
| 22 | assert "invalid base64 content" in str(exc.value) | 23 | assert "invalid base64 content" in str(exc.value) |
