コード例 #1
0
 def instantiate_from(self, filename):
     datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or \
               os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'fhir-parser', 'downloads'))
     with io.open(os.path.join(datadir, filename), 'r',
                  encoding='utf-8') as handle:
         js = json.load(handle)
         self.assertEqual("ClaimResponse", js["resourceType"])
     return claimresponse.ClaimResponse(js)
コード例 #2
0
    def testClaimResponse5(self):
        inst = self.instantiate_from("claimresponse-example-2.json")
        self.assertIsNotNone(
            inst, "Must have instantiated a ClaimResponse instance")
        self.implClaimResponse5(inst)

        js = inst.as_json()
        self.assertEqual("ClaimResponse", js["resourceType"])
        inst2 = claimresponse.ClaimResponse(js)
        self.implClaimResponse5(inst2)