Comment 5 for bug 1365751

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/121726
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=45553a6dda84ef6be38150071f8bb6fa9850a53e
Submitter: Jenkins
Branch: master

commit 45553a6dda84ef6be38150071f8bb6fa9850a53e
Author: Davanum Srinivas <email address hidden>
Date: Mon Sep 15 21:23:58 2014 -0400

    mock.assert_called_once() is not a valid method

    mock.assert_called_once() is a no-op that tests nothing. Instead
    with mock.assert_called_once_with() should be used (or use
    assertEqual(1, mock_obj.call_count) if you don't want to check
    parameters).

    Add a new HACKING rule for nova to prevent assert_called_once()
    usage from creeping in.

    Closes-Bug: #1365751

    Change-Id: I1055093a1c31792b6411a3cd46c80b8bcaaf78c1