File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
unit_tests/sources/declarative/validators Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,17 @@ def test_given_empty_schema_when_validate_then_succeeds(self):
114114
115115 validator = ValidateAdheresToSchema (schema = empty_schema )
116116
117- validator .validate (123 )
118- validator .validate ("string value" )
119117 validator .validate ({"complex" : "object" })
120- validator .validate ([1 , 2 , 3 ])
121- validator .validate (None )
122- validator .validate (True )
118+
119+ def test_given_json_string_when_validate_then_succeeds (self ):
120+ schema = {
121+ "type" : "object" ,
122+ "properties" : {
123+ "id" : {"type" : "integer" },
124+ "name" : {"type" : "string" },
125+ },
126+ }
127+
128+ validator = ValidateAdheresToSchema (schema = schema )
129+
130+ validator .validate ('{"id": 1, "name": "John Doe"}' )
You can’t perform that action at this time.
0 commit comments