<s> import os <EOL> import io <EOL> import unittest <EOL> import json <EOL> from . import location <EOL> from . fhirdate import FHIRDate <EOL> class LocationTests ( 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 location . Location ( js ) <EOL> def testLocation1 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implLocation1 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = location . Location ( js ) <EOL> self . implLocation1 ( inst2 ) <EOL> def implLocation1 ( self , inst ) : <EOL> self . assertEqual ( inst . description , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . mode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . name , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . use , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . div , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> def testLocation2 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implLocation2 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = location . Location ( js ) <EOL> self . implLocation2 ( inst2 ) <EOL> def implLocation2 ( self , inst ) : <EOL> self . assertEqual ( inst . address . city , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . country , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . line [ <NUM_LIT:0> ] , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . postalCode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . state , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . description , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . mode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . name , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . position . latitude , - <NUM_LIT> ) <EOL> self . assertEqual ( inst . position . longitude , <NUM_LIT> ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:1> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:1> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:2> ] . system , "<STR_LIT:email>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:2> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> def testLocation3 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implLocation3 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = location . Location ( js ) <EOL> self . implLocation3 ( inst2 ) <EOL> def implLocation3 ( self , inst ) : <EOL> self . assertEqual ( inst . description , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . mode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . name , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . div , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> def testLocation4 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implLocation4 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = location . Location ( js ) <EOL> self . implLocation4 ( inst2 ) <EOL> def implLocation4 ( self , inst ) : <EOL> self . assertEqual ( inst . description , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT:2>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . mode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . name , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . div , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> def testLocation5 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implLocation5 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = location . Location ( js ) <EOL> self . implLocation5 ( inst2 ) <EOL> def implLocation5 ( self , inst ) : <EOL> self . assertEqual ( inst . description , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . id , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . mode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . name , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . div , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . type . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> def testLocation6 ( self ) : <EOL> inst = self . instantiate_from ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( inst , "<STR_LIT>" ) <EOL> self . implLocation6 ( inst ) <EOL> js = inst . as_json ( ) <EOL> self . assertEqual ( "<STR_LIT>" , js [ "<STR_LIT>" ] ) <EOL> inst2 = location . Location ( js ) <EOL> self . implLocation6 ( inst2 ) <EOL> def implLocation6 ( self , inst ) : <EOL> self . assertEqual ( inst . address . city , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . country , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . line [ <NUM_LIT:0> ] , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . postalCode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . address . use , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . description , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . url , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . extension [ <NUM_LIT:0> ] . valueString , "<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 . id , "<STR_LIT:1>" ) <EOL> self . assertEqual ( inst . identifier [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . mode , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . name , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . code , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . display , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . physicalType . coding [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . position . altitude , <NUM_LIT:0> ) <EOL> self . assertEqual ( inst . position . latitude , <NUM_LIT> ) <EOL> self . assertEqual ( inst . position . longitude , - <NUM_LIT> ) <EOL> self . assertEqual ( inst . status , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . use , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:0> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:1> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:1> ] . use , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:1> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:2> ] . system , "<STR_LIT:email>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:2> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:3> ] . system , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:3> ] . use , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . telecom [ <NUM_LIT:3> ] . value , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . div , "<STR_LIT>" ) <EOL> self . assertEqual ( inst . text . status , "<STR_LIT>" ) </s>
