← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1297875] Re: some tests call "called_once_with_args" with no assert, those lines are ignored

 

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

** Also affects: neutron/icehouse
   Importance: Undecided
       Status: New

** Changed in: neutron/icehouse
    Milestone: None => icehouse-rc2

** Tags removed: icehouse-backport-potential

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1297875

Title:
  some tests call "called_once_with_args" with no assert, those lines
  are ignored

Status in OpenStack Neutron (virtual network service):
  Fix Committed
Status in neutron icehouse series:
  New

Bug description:
  A few tests use "called_once_with_args"  instead of mock's "assert_called_once_with_args"
  without checking the result.

  That means that we're not asserting for that to happen.

  Those tests need to be fixed.

  
  [majopela@f20-devstack neutron]$ grep ".called_once_with" * -R | grep -v assert
  neutron/tests/unit/test_dhcp_agent.py:            disable.called_once_with_args(network.id)

  neutron/tests/unit/test_dhcp_agent.py:
  uuid5.called_once_with(uuid.NAMESPACE_DNS, 'localhost')

  neutron/tests/unit/test_post_mortem_debug.py:
  mock_print_exception.called_once_with(*exc_info)

  neutron/tests/unit/test_db_migration.py:
  mock_open.write.called_once_with('a')

  neutron/tests/unit/test_agent_netns_cleanup.py:
  ovs_br_cls.called_once_with('br-int', conf.AGENT.root_helper)

  neutron/tests/unit/test_metadata_agent.py:
  self.eventlet.wsgi.server.called_once_with(

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


References