Exemplo n.º 1
0
    def test_schema_catches_missing_destination(self):
        with testtools.ExpectedException(jsonschema.exceptions.ValidationError,
                                         ".*None is not of type 'string'.*"):
            jsonschema.validate({'files': {'foo': None}}, CopyPlugin.schema())

        with testtools.ExpectedException(jsonschema.exceptions.ValidationError,
                                         ".*'' is too short.*"):
            jsonschema.validate({'files': {'foo': ''}}, CopyPlugin.schema())
Exemplo n.º 2
0
    def test_schema_catches_missing_destination(self):
        with testtools.ExpectedException(
                jsonschema.exceptions.ValidationError,
                ".*None is not of type 'string'.*"):
            jsonschema.validate({'files': {'foo': None}}, CopyPlugin.schema())

        with testtools.ExpectedException(
                jsonschema.exceptions.ValidationError,
                ".*'' is too short.*"):
            jsonschema.validate({'files': {'foo': ''}}, CopyPlugin.schema())