diff --git a/tests/test_validators.py b/tests/test_validators.py index 2e0d8d8..2b8484d 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -1,7 +1,5 @@ """Tests for syntax validation.""" -import pytest - from config_convert.validators import validate @@ -12,7 +10,7 @@ class TestValidateJSON: assert error is None def test_valid_json_pretty(self): - is_valid, error = validate('{\n "name": "test\n"}', "json") + is_valid, error = validate('{\n "name": "test"\n}', "json") assert is_valid is True def test_invalid_json(self): @@ -33,9 +31,9 @@ class TestValidateYAML: def test_valid_yaml_nested(self): data = """database: - host: localhost - port: 5432 - """ + host: localhost + port: 5432 +""" is_valid, error = validate(data, "yaml") assert is_valid is True @@ -53,9 +51,9 @@ class TestValidateTOML: def test_valid_toml_nested(self): data = """[database] - host = "localhost" - port = 5432 - """ +host = "localhost" +port = 5432 +""" is_valid, error = validate(data, "toml") assert is_valid is True