Merge "Fix test cases of listing with provisioning state"
This commit is contained in:
commit
6849d17352
@ -552,15 +552,6 @@ class NodeShellTest(utils.BaseTestCase):
|
|||||||
n_shell.do_node_list(client_mock, args)
|
n_shell.do_node_list(client_mock, args)
|
||||||
client_mock.node.list.assert_called_once_with(detail=False)
|
client_mock.node.list.assert_called_once_with(detail=False)
|
||||||
|
|
||||||
def test_do_node_list_provison_state(self):
|
|
||||||
client_mock = mock.MagicMock()
|
|
||||||
args = self._get_client_mock_args(provision_state='wait call-back')
|
|
||||||
|
|
||||||
n_shell.do_node_list(client_mock, args)
|
|
||||||
client_mock.node.list.assert_called_once_with(
|
|
||||||
provision_state='wait call-back',
|
|
||||||
detail=False)
|
|
||||||
|
|
||||||
def test_do_node_list_detail(self):
|
def test_do_node_list_detail(self):
|
||||||
client_mock = mock.MagicMock()
|
client_mock = mock.MagicMock()
|
||||||
args = self._get_client_mock_args(detail=True)
|
args = self._get_client_mock_args(detail=True)
|
||||||
@ -568,6 +559,26 @@ class NodeShellTest(utils.BaseTestCase):
|
|||||||
n_shell.do_node_list(client_mock, args)
|
n_shell.do_node_list(client_mock, args)
|
||||||
client_mock.node.list.assert_called_once_with(detail=True)
|
client_mock.node.list.assert_called_once_with(detail=True)
|
||||||
|
|
||||||
|
def test_do_node_list_provision_state(self):
|
||||||
|
client_mock = mock.MagicMock()
|
||||||
|
args = self._get_client_mock_args(provision_state='wait call-back',
|
||||||
|
detail=False)
|
||||||
|
|
||||||
|
n_shell.do_node_list(client_mock, args)
|
||||||
|
client_mock.node.list.assert_called_once_with(
|
||||||
|
provision_state='wait call-back',
|
||||||
|
detail=False)
|
||||||
|
|
||||||
|
def test_do_node_list_detail_provision_state(self):
|
||||||
|
client_mock = mock.MagicMock()
|
||||||
|
args = self._get_client_mock_args(provision_state='wait call-back',
|
||||||
|
detail=True)
|
||||||
|
|
||||||
|
n_shell.do_node_list(client_mock, args)
|
||||||
|
client_mock.node.list.assert_called_once_with(
|
||||||
|
provision_state='wait call-back',
|
||||||
|
detail=True)
|
||||||
|
|
||||||
def test_do_node_list_sort_key(self):
|
def test_do_node_list_sort_key(self):
|
||||||
client_mock = mock.MagicMock()
|
client_mock = mock.MagicMock()
|
||||||
args = self._get_client_mock_args(sort_key='created_at',
|
args = self._get_client_mock_args(sort_key='created_at',
|
||||||
|
Loading…
Reference in New Issue
Block a user