#NEWLINE# @ mock . patch ( 'nova.db.fixed_ip_get_by_address' ) #NEWLINE# @ mock . patch ( 'nova.db.network_get' ) #NEWLINE# @ mock . patch ( 'nova.db.instance_get' ) #NEWLINE# def test_get_by_address_with_extras( self , instance_get , network_get , fixed_get ) : #NEWLINE# #INDENT# db_fixed = dict ( fake_fixed_ip , network = test_network . fake_network , instance = fake_instance . fake_db_instance ( ) ) #NEWLINE# fixed_get . return_value = db_fixed #NEWLINE# fixedip = fixed_ip . FixedIP . get_by_address ( self . context , '1.2.3.4' , expected_attrs = [ 'network' , 'instance' ] ) #NEWLINE# fixed_get . assert_called_once_with ( self . context , '1.2.3.4' , columns_to_join = [ 'network' , 'instance' ] ) #NEWLINE# self . _compare ( fixedip , db_fixed ) #NEWLINE# self . assertEqual ( db_fixed [ 'network' ] [ 'uuid' ] , fixedip . network . uuid ) #NEWLINE# self . assertEqual ( db_fixed [ 'instance' ] [ 'uuid' ] , fixedip . instance . uuid ) #NEWLINE# self . assertFalse ( network_get . called ) #NEWLINE# self . assertFalse ( instance_get . called )