← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1316167] Re: mock.assert_not_called() is not a thing

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1316167

Title:
  mock.assert_not_called() is not a thing

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  We have 14 hits of tests using mock.assert_not_called() which is not a
  real method for mocks:

  nova
  nova
  tests
  api
  openstack
  test_common.py
  395: href_link_mock.assert_not_called() 
  compute
  test_compute_utils.py (2 matches)
  764: mock_log.warning.assert_not_called() 
  775: mock_log.warning.assert_not_called() 
  image
  test_glance.py (10 matches)
  548: img.assert_not_called() 
  556: img.assert_not_called() 
  690: trans_from_mock.assert_not_called() 
  708: is_avail_mock.assert_not_called() 
  709: trans_from_mock.assert_not_called() 
  754: trans_from_mock.assert_not_called() 
  791: is_avail_mock.assert_not_called() 
  792: trans_from_mock.assert_not_called() 
  848: trans_from_mock.assert_not_called() 
  920: trans_from_mock.assert_not_called() 
  virt
  baremetal
  test_nova_baremetal_deploy_helper.py
  339: self.m_mp.assert_not_called() 

  
  https://code.google.com/p/mock/issues/detail?id=159

  We should be using self.assertFalse(mock.called) instead.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1316167/+subscriptions


References