#NEWLINE# def test_router_add_to_hosting_device_two_times( self ) : #NEWLINE# #INDENT# with self . router ( ) as router : #NEWLINE# #INDENT# r = router [ 'router' ] #NEWLINE# rt_id = '00000000-0000-0000-0000-000000000005' #NEWLINE# self . assertEqual ( rt_id , r [ routertype . TYPE_ATTR ] ) #NEWLINE# self . assertIsNone ( r [ HOSTING_DEVICE_ATTR ] ) #NEWLINE# self . _add_router_to_hosting_device ( '00000000-0000-0000-0000-000000000001' , r [ 'id' ] ) #NEWLINE# r_after = self . _show ( 'routers' , r [ 'id' ] ) [ 'router' ] #NEWLINE# self . assertEqual ( rt_id , r_after [ routertype . TYPE_ATTR ] ) #NEWLINE# self . assertEqual ( '00000000-0000-0000-0000-000000000001' , r_after [ HOSTING_DEVICE_ATTR ] ) #NEWLINE# self . _add_router_to_hosting_device ( '00000000-0000-0000-0000-000000000001' , r [ 'id' ] ) #NEWLINE# r_final = self . _show ( 'routers' , r [ 'id' ] ) [ 'router' ] #NEWLINE# self . assertEqual ( rt_id , r_final [ routertype . TYPE_ATTR ] ) #NEWLINE# self . assertEqual ( '00000000-0000-0000-0000-000000000001' , r_final [ HOSTING_DEVICE_ATTR ] )