]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix test_create_volume_flow test issue
authorGorka Eguileor <geguileo@redhat.com>
Wed, 2 Mar 2016 13:21:31 +0000 (14:21 +0100)
committerGorka Eguileor <geguileo@redhat.com>
Wed, 2 Mar 2016 14:16:22 +0000 (15:16 +0100)
commit53e35b37372d8a543086a2117551fe0e2b6156b9
tree7df17d16ccfb85fa702fd4d00834525d35a2bda7
parentfc2e0f454da174eb56d54350a920c211542d0d6d
Fix test_create_volume_flow test issue

One of the tests in
cinder/tests/unit/volume/flows/test_create_volume_flow.py incorrectly
mocks time.time function which means that when there's a call to
time.time() it will raise an error because real time function doesn't
expect any arguments but the mock method does expect self as an
argument.

For some reason time.time function does not get called on every test
run, but when it does get called it will fail.

This patch fixes this by binding the mock method to the current self
instance.

Change-Id: Ia70e51719abb9a6ed357802446847ffa81d7427e
cinder/tests/unit/volume/flows/test_create_volume_flow.py