Skip to content

Commit 8dc4ba2

Browse files
committed
Update
1 parent d9e9272 commit 8dc4ba2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include datacontract-specification-json-schema-v1.1.0.json
1+
include datacontract_specification/datacontract-specification-json-schema-v1.1.0.json

src/datacontract_specification/data_contract_specification.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def from_string(cls, data_contract_str: str) -> "DataContractSpecification":
330330

331331
@classmethod
332332
def json_schema(cls):
333-
package_name = __name__.split('.')[0]
333+
package_name = __package__
334334
json_schema = "datacontract-specification-json-schema-v1.1.0.json"
335335
with impresources.open_text(package_name,
336336
json_schema) as file:

src/datacontract_specification/test_data_contract_specification.py

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ def test_roundtrip():
2424

2525
def assert_equals_yaml(data_contract_str):
2626
assert yaml.safe_load(data_contract_str) == yaml.safe_load(DataContractSpecification.from_string(data_contract_str).to_yaml())
27+
28+
def test_json_schema():
29+
assert "" != DataContractSpecification.json_schema()

0 commit comments

Comments
 (0)