Reviewed: https://review.opendev.org/677330 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8e7e54f60b0374d6439a4cedc098c5a3c97b79d9 Submitter: Zuul Branch: stable/rocky
commit 8e7e54f60b0374d6439a4cedc098c5a3c97b79d9 Author: Takashi NATSUME <email address hidden> Date: Thu Aug 15 10:00:38 2019 +0900
Fix 'has_calls' method calls in unit tests
The 'has_calls' method does not exist in assertion methods of mock. Replace the 'has_calls' method with an 'assert_has_calls' method or an 'assert_called_once_with' method. Add an 'assertEqual' check before an 'assert_has_calls' method.
Conflicts: nova/tests/unit/compute/test_compute_mgr.py
NOTE(takashin): The conflict is due to not having the following change in stable/rocky.
Ic062446e5c620c89aec3065b34bcdc6bf5966275
Change-Id: I4b606fce473d064b9bb00213696c075cea020aaf Closes-Bug: #1840200 (cherry picked from commit ad482e53fbb956288e73692f6bff5f74d862fe5d) (cherry picked from commit fa59033c40745febc26399e668ceb9911f8ec45d)
Reviewed: https:/ /review. opendev. org/677330 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=8e7e54f60b0 374d6439a4cedc0 98c5a3c97b79d9
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 8e7e54f60b0374d 6439a4cedc098c5 a3c97b79d9
Author: Takashi NATSUME <email address hidden>
Date: Thu Aug 15 10:00:38 2019 +0900
Fix 'has_calls' method calls in unit tests
The 'has_calls' method does not exist in assertion methods of mock. called_ once_with' method.
Replace the 'has_calls' method with an 'assert_has_calls' method or
an 'assert_
Add an 'assertEqual' check before an 'assert_has_calls' method.
Conflicts:
nova/tests/ unit/compute/ test_compute_ mgr.py
NOTE(takashin): The conflict is due to not having the following change
in stable/rocky.
Change-Id: I4b606fce473d06 4b9bb00213696c0 75cea020aaf 88e73692f6bff5f 74d862fe5d) bc26399e668ceb9 911f8ec45d)
Closes-Bug: #1840200
(cherry picked from commit ad482e53fbb9562
(cherry picked from commit fa59033c40745fe