Ejemplo n.º 1
0
    def test_uri_invalid(self):
        validation = ChromaValidation()

        errors = defaultdict(list)

        self.assertTrue(validation.validate_resources([validation.URIInfo("invalid", MockResource)], errors))

        self.assertEqual(errors, {"invalid": ["Resource invalid was not found"]})
Ejemplo n.º 2
0
    def test_uri_valid(self):
        validation = ChromaValidation()

        errors = defaultdict(list)

        self.assertFalse(validation.validate_resources([validation.URIInfo("valid", MockResource)], errors))

        self.assertEqual(errors, {})