diff options
| author | Hongbin Lu <hongbin.lu@huawei.com> | 2018-03-16 18:34:07 +0000 |
|---|---|---|
| committer | Slawek Kaplonski <slawek@kaplonski.pl> | 2018-03-23 23:24:20 +0000 |
| commit | 8dac1afd43481d9c9ffcde3674eed3f7c64896ab (patch) | |
| tree | 94a7cb58d6a77892cfc2b20faa1d8d1a56751a01 /neutronclient/tests/unit | |
| parent | 633a20cde9a282f17b59d120f5c97e3989e6cec1 (diff) | |
| download | python-neutronclient-8dac1afd43481d9c9ffcde3674eed3f7c64896ab.tar.gz | |
Remove mox/mox3 usage from bgp
Change-Id: Ie07cf987382281c00023b41ce74c314ec2457502
Partial-Bug: #1753504
Diffstat (limited to 'neutronclient/tests/unit')
| -rw-r--r-- | neutronclient/tests/unit/bgp/test_cli20_speaker.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/neutronclient/tests/unit/bgp/test_cli20_speaker.py b/neutronclient/tests/unit/bgp/test_cli20_speaker.py index 2f6e653..72612dc 100644 --- a/neutronclient/tests/unit/bgp/test_cli20_speaker.py +++ b/neutronclient/tests/unit/bgp/test_cli20_speaker.py @@ -16,7 +16,7 @@ import sys -from mox3 import mox +import mock from neutronclient.common import exceptions from neutronclient.neutron.v2_0.bgp import speaker as bgp_speaker @@ -155,18 +155,15 @@ class CLITestV20BGPSpeakerJSON(test_cli20.CLITestV20Base): None) self._test_list_resources(resources, cmd, True) - def test_list_bgp_speaker_pagination(self): + @mock.patch.object(bgp_speaker.ListSpeakers, "extend_list") + def test_list_bgp_speaker_pagination(self, mock_extend_list): # List all BGP Speakers with pagination support. cmd = bgp_speaker.ListSpeakers(test_cli20.MyApp(sys.stdout), None) - self.mox.StubOutWithMock(bgp_speaker.ListSpeakers, - "extend_list") - bgp_speaker.ListSpeakers.extend_list(mox.IsA(list), - mox.IgnoreArg()) self._test_list_resources_with_pagination("bgp_speakers", cmd) - self.mox.VerifyAll() - self.mox.UnsetStubs() + mock_extend_list.assert_called_once_with(test_cli20.IsA(list), + mock.ANY) def test_list_bgp_speaker_sort(self): # sorted list: bgp-speaker-list --sort-key name --sort-key id |
