<s> import os <EOL> import io <EOL> import unittest <EOL> import json <EOL> from . import basic <EOL> from . fhirdate import FHIRDate <EOL> class BasicTests ( unittest . TestCase ) : <EOL> def instantiate_from ( self , filename ) : <EOL> datadir = os . environ . get ( '<STR_LIT>' ) or '<STR_LIT>' <EOL> with io . open ( os . path . join ( datadir , filename ) , '<STR_LIT:r>' , encoding = '<STR_LIT:utf-8>' ) as handle : <EOL> js = json . load ( handle ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> return basic . Basic ( js ) <EOL> def testBasic1 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implBasic1 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = basic . Basic ( js ) <EOL> self . implBasic1 ( inst2 ) <EOL> def implBasic1 ( self , inst ) : <EOL> self . assertEqual ( inst . code . text , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testBasic2 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implBasic2 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = basic . Basic ( js ) <EOL> self . implBasic2 ( inst2 ) <EOL> def implBasic2 ( self , inst ) : <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . created . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . created . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:1> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:1> ] . valueString , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:2> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:0> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:0> ] . valueCodeableConcept . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:0> ] . valueCodeableConcept . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:0> ] . valueCodeableConcept . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:1> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:1> ] . valuePeriod . end . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:1> ] . valuePeriod . end . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:1> ] . valuePeriod . start . date , FHIRDate ( "<STR_LIT>" ) . date ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:1> ] . valuePeriod . start . as_json ( ) , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:2> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . modifierExtension [ <NUM_LIT:2> ] . valueCode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> def testBasic3 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implBasic3 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = basic . Basic ( js ) <EOL> self . implBasic3 ( inst2 ) <EOL> def implBasic3 ( self , inst ) : <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . code . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:0> ] . url , "<STR_LIT:name>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:0> ] . valueString , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . extension [ <NUM_LIT:0> ] . url , "<STR_LIT:name>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . extension [ <NUM_LIT:0> ] . valueString , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . extension [ <NUM_LIT:1> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . extension [ <NUM_LIT:1> ] . valueInteger , <NUM_LIT:1> ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . extension [ <NUM_LIT:2> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . extension [ <NUM_LIT:2> ] . valueCode , "<STR_LIT:*>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:1> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . extension [ <NUM_LIT:0> ] . url , "<STR_LIT:name>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . extension [ <NUM_LIT:0> ] . valueString , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . extension [ <NUM_LIT:1> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . extension [ <NUM_LIT:1> ] . valueInteger , <NUM_LIT:0> ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . extension [ <NUM_LIT:2> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . extension [ <NUM_LIT:2> ] . valueInteger , <NUM_LIT:1> ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . extension [ <NUM_LIT:2> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) </s>
