Skip to content

Commit 8f0d947

Browse files
p1-alexandrevaneyp1-ra
authored andcommitted
fix data_load json test
1 parent 6a45966 commit 8f0d947

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

openapi_python_client/resolver/data_loader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import yaml
21
import json
32

3+
import yaml
4+
45
from .resolver_types import SchemaData
56

67

tests/test_resolver/test_resolver_data_loader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def test_load_yaml(mocker):
4545
def test_load_json(mocker):
4646
from openapi_python_client.resolver.data_loader import DataLoader
4747

48+
json_loads = mocker.patch("json.loads")
49+
4850
content = mocker.MagicMock()
49-
with pytest.raises(NotImplementedError):
50-
DataLoader.load_json(content)
51+
DataLoader.load_json(content)
52+
json_loads.assert_called_once_with(content)

0 commit comments

Comments
 (0)