#NEWLINE# def test_get_bound_port_context_cache_miss( self ) : #NEWLINE# #INDENT# ctx = context . get_admin_context ( ) #NEWLINE# with self . port ( name = 'name' ) as port : #NEWLINE# #INDENT# some_network = { #NEWLINE# #INDENT# 'id' : '2ac23560-7638-44e2-9875-c1888b02af72' , #NEWLINE# #UNINDENT# } #NEWLINE# self . plugin . get_network = mock . Mock ( return_value = some_network ) #NEWLINE# self . plugin . get_bound_port_context ( ctx , port [ 'port' ] [ 'id' ] , cached_networks = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 1 , self . plugin . get_network . call_count )