示例#1
0
def test_activitydefinition_10(base_settings):
    """No. 10 tests collection for ActivityDefinition.
    Test File: activitydefinition-provide-mosquito-prevention-advice.json
    """
    filename = (base_settings["unittest_data_dir"] /
                "activitydefinition-provide-mosquito-prevention-advice.json")
    inst = activitydefinition.ActivityDefinition.parse_file(
        filename, content_type="application/json", encoding="utf-8")
    assert "ActivityDefinition" == inst.resource_type

    impl_activitydefinition_10(inst)

    # testing reverse by generating data from itself and create again.
    data = inst.dict()
    assert "ActivityDefinition" == data["resourceType"]

    inst2 = activitydefinition.ActivityDefinition(**data)
    impl_activitydefinition_10(inst2)
示例#2
0
def test_activitydefinition_7(base_settings):
    """No. 7 tests collection for ActivityDefinition.
    Test File: activitydefinition-order-serum-zika-dengue-virus-igm.json
    """
    filename = (base_settings["unittest_data_dir"] /
                "activitydefinition-order-serum-zika-dengue-virus-igm.json")
    inst = activitydefinition.ActivityDefinition.parse_file(
        filename, content_type="application/json", encoding="utf-8")
    assert "ActivityDefinition" == inst.resource_type

    impl_activitydefinition_7(inst)

    # testing reverse by generating data from itself and create again.
    data = inst.dict()
    assert "ActivityDefinition" == data["resourceType"]

    inst2 = activitydefinition.ActivityDefinition(**data)
    impl_activitydefinition_7(inst2)