def test_bundle_2(base_settings): """No. 2 tests collection for Bundle. Test File: location-examples-general.json """ filename = base_settings["unittest_data_dir"] / "location-examples-general.json" inst = bundle.Bundle.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "Bundle" == inst.resource_type impl_bundle_2(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "Bundle" == data["resourceType"] inst2 = bundle.Bundle(**data) impl_bundle_2(inst2)
def test_bundle_5(base_settings): """No. 5 tests collection for Bundle. Test File: diagnosticreport-example-f202-bloodculture.json """ filename = ( base_settings["unittest_data_dir"] / "diagnosticreport-example-f202-bloodculture.json" ) inst = bundle.Bundle.parse_file( filename, content_type="application/json", encoding="utf-8" ) assert "Bundle" == inst.resource_type impl_bundle_5(inst) # testing reverse by generating data from itself and create again. data = inst.dict() assert "Bundle" == data["resourceType"] inst2 = bundle.Bundle(**data) impl_bundle_5(inst2)