Public bug reported:

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.

** Affects: nova
     Importance: Undecided
     Assignee: Matt Riedemann (mriedem)
         Status: New


** Tags: testing

** Changed in: nova
     Assignee: (unassigned) => Matt Riedemann (mriedem)

-- 
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):
  New

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to