fix: resolve CI/CD test failures and linting issues
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
"""Tests for syntax validation."""
|
"""Tests for syntax validation."""
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from config_convert.validators import validate
|
from config_convert.validators import validate
|
||||||
|
|
||||||
|
|
||||||
@@ -12,7 +10,7 @@ class TestValidateJSON:
|
|||||||
assert error is None
|
assert error is None
|
||||||
|
|
||||||
def test_valid_json_pretty(self):
|
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
|
assert is_valid is True
|
||||||
|
|
||||||
def test_invalid_json(self):
|
def test_invalid_json(self):
|
||||||
@@ -33,9 +31,9 @@ class TestValidateYAML:
|
|||||||
|
|
||||||
def test_valid_yaml_nested(self):
|
def test_valid_yaml_nested(self):
|
||||||
data = """database:
|
data = """database:
|
||||||
host: localhost
|
host: localhost
|
||||||
port: 5432
|
port: 5432
|
||||||
"""
|
"""
|
||||||
is_valid, error = validate(data, "yaml")
|
is_valid, error = validate(data, "yaml")
|
||||||
assert is_valid is True
|
assert is_valid is True
|
||||||
|
|
||||||
@@ -53,9 +51,9 @@ class TestValidateTOML:
|
|||||||
|
|
||||||
def test_valid_toml_nested(self):
|
def test_valid_toml_nested(self):
|
||||||
data = """[database]
|
data = """[database]
|
||||||
host = "localhost"
|
host = "localhost"
|
||||||
port = 5432
|
port = 5432
|
||||||
"""
|
"""
|
||||||
is_valid, error = validate(data, "toml")
|
is_valid, error = validate(data, "toml")
|
||||||
assert is_valid is True
|
assert is_valid is True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user