#NEWLINE# def test_create_and_delete_network( self ) : #NEWLINE# #INDENT# scenario = networks . NovaNetworks ( ) #NEWLINE# fake_network = mock . MagicMock ( ) #NEWLINE# fake_network . cidr = '10.2.0.0/24' #NEWLINE# start_cidr = '10.2.0.0/24' #NEWLINE# scenario . _create_network = mock . MagicMock ( return_value = fake_network ) #NEWLINE# scenario . _delete_network = mock . MagicMock ( ) #NEWLINE# scenario . create_and_delete_network ( start_cidr = start_cidr , fakearg = 'fakearg' ) #NEWLINE# scenario . _create_network . assert_called_once_with ( scenario , fakearg = 'fakearg' ) #NEWLINE# scenario . _delete_network . assert_called_once_with ( fake_network )