示例#1
0
def test_evidencevariable_1(base_settings):
    """No. 1 tests collection for EvidenceVariable.
    Test File: evidencevariable-example-fatal-ICH-in-7-days.json
    """
    filename = (base_settings["unittest_data_dir"] /
                "evidencevariable-example-fatal-ICH-in-7-days.json")
    inst = evidencevariable.EvidenceVariable.parse_file(
        filename, content_type="application/json", encoding="utf-8")
    assert "EvidenceVariable" == inst.resource_type

    impl_evidencevariable_1(inst)

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

    inst2 = evidencevariable.EvidenceVariable(**data)
    impl_evidencevariable_1(inst2)
示例#2
0
def test_evidencevariable_9(base_settings):
    """No. 9 tests collection for EvidenceVariable.
    Test File: evidencevariable-example-Stroke-Thrombolysis-Trialists-2014-2016-IPD-MA-Cohort.json
    """
    filename = (
        base_settings["unittest_data_dir"] /
        "evidencevariable-example-Stroke-Thrombolysis-Trialists-2014-2016-IPD-MA-Cohort.json"
    )
    inst = evidencevariable.EvidenceVariable.parse_file(
        filename, content_type="application/json", encoding="utf-8")
    assert "EvidenceVariable" == inst.resource_type

    impl_evidencevariable_9(inst)

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

    inst2 = evidencevariable.EvidenceVariable(**data)
    impl_evidencevariable_9(inst2)