Skip to content

Commit

Permalink
And the last stray warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Nov 25, 2018
1 parent 8e8fc6e commit 28d5747
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions jsonschema/tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,23 @@ def setUp(self):
)

def test_attrs(self):
self.assertEqual(self.Validator.VALIDATORS, self.validators)
self.assertEqual(self.Validator.META_SCHEMA, self.meta_schema)
self.assertEqual(self.Validator.TYPE_CHECKER, self.type_checker)
self.assertEqual(
(
self.Validator.VALIDATORS,
self.Validator.META_SCHEMA,
self.Validator.TYPE_CHECKER,
), (
self.validators,
self.meta_schema,
self.type_checker,
),
)

# Default types should still be set to the old default if not provided
expected_types = {u"array", u"boolean", u"integer", u"null", u"number",
u"object", u"string"}
self.assertEqual(set(self.Validator.DEFAULT_TYPES), expected_types)
self.assertEqual(len(self.flushWarnings()), 1)

def test_init(self):
schema = {u"startswith": u"foo"}
Expand Down

0 comments on commit 28d5747

Please sign in to comment.