diff options
| author | Hongbin Lu <hongbin.lu@huawei.com> | 2018-03-15 17:58:49 +0000 |
|---|---|---|
| committer | Hongbin Lu <hongbin.lu@huawei.com> | 2018-03-19 17:44:12 +0000 |
| commit | 93e4ef2e7de95aa16e13331df14b2d157c9a24a5 (patch) | |
| tree | 8d89028af09fccc3bfd9e362665f67dbc6c9b23a /neutronclient/tests/unit | |
| parent | c50b1267710fdc0585a8618c6f9513bd0f3a6161 (diff) | |
| download | python-neutronclient-93e4ef2e7de95aa16e13331df14b2d157c9a24a5.tar.gz | |
Remove mox/mox3 usage from test_cli20_subnetpool.py
Change-Id: I26e15e051a9754f61d9ba04a59f62bc979e52fb1
Partial-Bug: #1753504
Diffstat (limited to 'neutronclient/tests/unit')
| -rw-r--r-- | neutronclient/tests/unit/test_cli20_subnetpool.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/neutronclient/tests/unit/test_cli20_subnetpool.py b/neutronclient/tests/unit/test_cli20_subnetpool.py index 343393e..89a89b2 100644 --- a/neutronclient/tests/unit/test_cli20_subnetpool.py +++ b/neutronclient/tests/unit/test_cli20_subnetpool.py @@ -16,7 +16,7 @@ import sys -from mox3 import mox +import mock from neutronclient.common import exceptions from neutronclient.neutron.v2_0 import subnetpool @@ -135,13 +135,12 @@ class CLITestV20SubnetPoolJSON(test_cli20.CLITestV20Base): cmd, name, myid, args, position_names, position_values) - def test_list_subnetpool_pagination(self): + @mock.patch.object(subnetpool.ListSubnetPool, "extend_list") + def test_list_subnetpool_pagination(self, mock_extend_list): cmd = subnetpool.ListSubnetPool(test_cli20.MyApp(sys.stdout), None) - self.mox.StubOutWithMock(subnetpool.ListSubnetPool, "extend_list") - subnetpool.ListSubnetPool.extend_list(mox.IsA(list), mox.IgnoreArg()) self._test_list_resources_with_pagination("subnetpools", cmd) - self.mox.VerifyAll() - self.mox.UnsetStubs() + mock_extend_list.assert_called_once_with(test_cli20.IsA(list), + mock.ANY) def test_list_subnetpools_sort(self): # List subnetpools: |
