Exemplo n.º 1
0
    def test_check_schemas_compatible(self):
        cases = [{
            'type': 'object'
        }, {
            'type': 'array'
        }, {
            'type': None
        }, {}, None]

        for s in cases:
            self.assertEqual(utils.get_schema_type(s),
                             utils.check_schemas_compatible(s, s))
Exemplo n.º 2
0
    def test_check_schemas_compatible(self):
        cases = [{
            "type": "object"
        }, {
            "type": "array"
        }, {
            "type": None
        }, {}, None]

        for s in cases:
            self.assertEqual(schema_util.get_schema_type(s),
                             schema_util.check_schemas_compatible(s, s))
Exemplo n.º 3
0
 def test_get_schema_type(self):
     self.assertEqual('object', utils.get_schema_type({'type': 'object'}))
     self.assertIsNone(utils.get_schema_type({}))
     self.assertIsNone(utils.get_schema_type(None))
Exemplo n.º 4
0
 def test_get_schema_type(self):
     self.assertEqual("object",
                      schema_util.get_schema_type({"type": "object"}))
     self.assertIsNone(schema_util.get_schema_type({}))
     self.assertIsNone(schema_util.get_schema_type(None))