Comment 2 for bug 1297875

Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

After setting the right asserts, a few tests are failing, so we will fix them/the code with this bug:

FAIL: neutron.tests.unit.test_post_mortem_debug.TestTesttoolsExceptionHandler.test_exception_handler
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "neutron/tests/unit/test_post_mortem_debug.py", line 41, in test_exception_handler
    mock_print_exception.assert_called_once_with(*exc_info)
  File "/opt/stack/neutron/.venv/lib/python2.7/site-packages/mock.py", line 846, in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
  File "/opt/stack/neutron/.venv/lib/python2.7/site-packages/mock.py", line 835, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: print_exception(<type 'exceptions.AssertionError'>, AssertionError('False is not true',), <traceback object at 0x17b8200>)
Actual call: print_exception(<type 'exceptions.AssertionError'>, AssertionError('False is not true',), <neutron.tests.post_mortem_debug.FilteredTraceback object at 0x17cb290>)

Ran 7 tests in 0.010s
FAILED (failures=1)

======================================================================
FAIL: neutron.tests.unit.test_dhcp_agent.TestDeviceManager.test_get_device_id
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "neutron/tests/unit/test_dhcp_agent.py", line 1308, in test_get_device_id
    uuid5.assert_called_once_with(uuid.NAMESPACE_DNS, 'localhost')
  File "/opt/stack/neutron/.venv/lib/python2.7/site-packages/mock.py", line 845, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected to be called once. Called 0 times.

Ran 99 tests in 1.325s
FAILED (failures=1)

======================================================================
FAIL: neutron.tests.unit.test_db_migration.TestCli.test_update_head_file_success
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "neutron/tests/unit/test_db_migration.py", line 184, in test_update_head_file_success
    mock_open.write.assert_called_once_with('a')
  File "/opt/stack/neutron/.venv/lib/python2.7/site-packages/mock.py", line 845, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected to be called once. Called 0 times.

Ran 15 tests in 0.112s
FAILED (failures=1)