aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-23 15:08:55 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-23 15:08:55 +0200
commit13eeb4c9f4e86b9e1959212a1f9ba06164c7f4af (patch)
tree2afd9613d1d6232f5f83d860f0972f115e8851b0
parentRemove `hypothesis`. (diff)
Exclude `admin.py` modules.
-rw-r--r--.coveragerc1
-rw-r--r--api/tests/test_validators.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/.coveragerc b/.coveragerc
index 74dbec20..806e2cfe 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -7,6 +7,7 @@ source =
wiki
omit =
+ */admin.py
*/apps.py
pysite/wsgi.py
pysite/settings.py
diff --git a/api/tests/test_validators.py b/api/tests/test_validators.py
index c2bb412b..51f02412 100644
--- a/api/tests/test_validators.py
+++ b/api/tests/test_validators.py
@@ -10,6 +10,10 @@ REQUIRED_KEYS = (
class TagEmbedValidatorTests(TestCase):
+ def test_rejects_non_mapping(self):
+ with self.assertRaises(ValidationError):
+ validate_tag_embed('non-empty non-mapping')
+
def test_rejects_missing_required_keys(self):
with self.assertRaises(ValidationError):
validate_tag_embed({