Comment 2 for bug 1335859

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

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

commit aaa9d6a8a28335b8dac4e1d4045571aa565e3196
Author: Sergey Nikitin <email address hidden>
Date: Mon Jun 30 17:55:46 2014 +0400

    Fixed wrong assertion in test_vmops.py

    There is wrong assert method in
    nova.tests.virt.vmwareapi.vmwareapi.test_vmops.py:640
    while checking a number of calls mocked method 'mkdir'.

    We should use assertEqual(3, len(mock_mkdir.mock_calls))
    instead of self.assertTrue(3, len(mock_mkdir.mock_calls))

    But number of calling method 'mkdir' not always is 3.
    If dict block_device_info contains key 'block_device_mapping'
    with any information, method 'mkdir' wouldn't be called in method
    self._vmops.spawn(). That is why corresponding check been added.

    Change-Id: Ifc26e112b9c2974e0fb7a91ba39d5b2d887bd549
    Closes-Bug: #1335859