Adds Test to AllOf
This commit is contained in:
@@ -45,7 +45,7 @@ repository = "https://github.com/HideyoshiNakazone/jambo.git"
|
|||||||
# POE Tasks
|
# POE Tasks
|
||||||
[tool.poe.tasks]
|
[tool.poe.tasks]
|
||||||
create-hooks = "bash .githooks/set-hooks.sh"
|
create-hooks = "bash .githooks/set-hooks.sh"
|
||||||
tests = "python -m coverage run -m unittest -v"
|
tests = "python -m coverage run -m unittest discover -v"
|
||||||
tests-report = "python -m coverage xml"
|
tests-report = "python -m coverage xml"
|
||||||
|
|
||||||
# Build System
|
# Build System
|
||||||
|
|||||||
@@ -183,6 +183,22 @@ class TestAllOfTypeParser(TestCase):
|
|||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
AllOfTypeParser().from_properties("placeholder", properties)
|
AllOfTypeParser().from_properties("placeholder", properties)
|
||||||
|
|
||||||
|
def test_all_of_invalid_type_not_all_equal(self):
|
||||||
|
"""
|
||||||
|
Tests that an error is raised when the allOf types are not all equal.
|
||||||
|
"""
|
||||||
|
|
||||||
|
properties = {
|
||||||
|
"allOf": [
|
||||||
|
{"type": "string", "maxLength": 11},
|
||||||
|
{"type": "integer", "maxLength": 4},
|
||||||
|
{"type": "string", "minLength": 1},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
with self.assertRaises(ValueError):
|
||||||
|
AllOfTypeParser().from_properties("placeholder", properties)
|
||||||
|
|
||||||
def test_all_of_description_field(self):
|
def test_all_of_description_field(self):
|
||||||
"""
|
"""
|
||||||
Tests the AllOfTypeParser with a description field.
|
Tests the AllOfTypeParser with a description field.
|
||||||
|
|||||||
Reference in New Issue
Block a user