There is no method called_once_with() in Mock object.
Use assert_called_once_with() or assert_has_calls() instead.
NOTE(takashin): Additional changes are also applied to
nova/tests/unit/virt/libvirt/test_vif.py
because the following change has not been applied in stable/rocky.
I047856982251fddc631679fb2dbcea0f3b0db097
Change-Id: I9f73fcbe7c3dfd64e75ac8224c13934b03443cd5
Closes-Bug: #1544522
(cherry picked from commit cf7d28eb6ea47818e9f3584f65ec025f5a46326b)
(cherry picked from commit d90186068b197f0912fa2bf525bb752f2d8f3c31)
Reviewed: https:/ /review. opendev. org/676840 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=a5f39bd9c37 71b4cf64c1a5b68 bb850988e1fc73
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit a5f39bd9c3771b4 cf64c1a5b68bb85 0988e1fc73
Author: Takashi NATSUME <email address hidden>
Date: Wed Aug 7 14:38:45 2019 +0900
Fix non-existent method of Mock
There is no method called_once_with() in Mock object. called_ once_with( ) or assert_has_calls() instead.
Use assert_
NOTE(takashin): Additional changes are also applied to tests/unit/ virt/libvirt/ test_vif. py
nova/
because the following change has not been applied in stable/rocky.
Change-Id: I9f73fcbe7c3dfd 64e75ac8224c139 34b03443cd5 8e9f3584f65ec02 5f5a46326b) 912fa2bf525bb75 2f2d8f3c31)
Closes-Bug: #1544522
(cherry picked from commit cf7d28eb6ea4781
(cherry picked from commit d90186068b197f0