Replace assert_called_twice with self.assertEqual(2, <...>.call_count).
Replace assert_called_once() with self.assertEqual(1, <...>.call_count).
Use a list of calls for the assert_has_calls function.
Also updates mock requirement, to match global requirements for kilo
Reviewed: https:/ /review. openstack. org/200751 /git.openstack. org/cgit/ openstack/ python- muranoclient/ commit/ ?id=c132a6aaddc de2531c0276f549 b4fe5e42cc902f
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit c132a6aaddcde25 31c0276f549b4fe 5e42cc902f
Author: Kirill Zaitsev <email address hidden>
Date: Sat Jul 11 00:58:02 2015 +0300
Fix the unit tests with wrong usage of mock
Replace assert_called_twice with self.assertEqual(2, <...>.call_count). called_ once() with self.assertEqual(1, <...>.call_count).
Replace assert_
Use a list of calls for the assert_has_calls function.
Also updates mock requirement, to match global requirements for kilo
Closes-Bug: #1473369 95c31291f03afc9 9ab3b1eb569
Co-Author: Victor Ryzhenkin <email address hidden>
Co-Author: Sergey Vilgelm <email address hidden>
Change-Id: Idccd60140c8e51