Skip to content

Commit d6be1f3

Browse files
authored
chore: remove cfn-lint dep (#2698)
1 parent 43ffa03 commit d6be1f3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

requirements/dev.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@ mypy==0.971
3535
boto3-stubs[appconfig,serverlessrepo]>=1.19.5,==1.*
3636
types-PyYAML~=5.4
3737
types-jsonschema~=3.2
38-
39-
cfn-flip~=1.3.0

tests/schema/test_validate_schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from pathlib import Path
77
from typing import Iterator
88
from unittest import TestCase
9-
from cfn_flip import to_json # type: ignore
109
from jsonschema import validate
1110
from jsonschema.exceptions import ValidationError
1211
from parameterized import parameterized
1312

13+
from samtranslator.yaml_helper import yaml_parse
1414

1515
SCHEMA = json.loads(Path("samtranslator/schema/schema.json").read_bytes())
1616

@@ -76,7 +76,7 @@ def get_all_test_templates():
7676
class TestValidateSchema(TestCase):
7777
@parameterized.expand(itertools.product(SCHEMA_VALIDATION_TESTS))
7878
def test_validate_schema(self, testcase):
79-
obj = json.loads(to_json(Path(testcase).read_bytes()))
79+
obj = yaml_parse(Path(testcase).read_bytes())
8080
validate(obj, schema=SCHEMA)
8181

8282
@parameterized.expand(
@@ -86,6 +86,6 @@ def test_validate_schema(self, testcase):
8686
]
8787
)
8888
def test_validate_schema_error(self, testcase):
89-
obj = json.loads(to_json(Path(testcase).read_bytes()))
89+
obj = yaml_parse(Path(testcase).read_bytes())
9090
with pytest.raises(ValidationError):
9191
validate(obj, schema=SCHEMA)

0 commit comments

Comments
 (0)