Exemplo n.º 1
0
    def test_do_explain(self):
        input = {"page_size": 18, "id": "pass", "schemas": "test", "model": "test"}
        args = self._make_args(input)
        with mock.patch.object(utils, "print_list"):
            test_shell.do_explain(self.gc, args)

            self.gc.schemas.get.assert_called_once_with("test")
    def test_do_explain(self):
        input = {
            'page_size': 18,
            'id': 'pass',
            'schemas': 'test',
            'model': 'test',
        }
        args = self._make_args(input)
        with mock.patch.object(utils, 'print_list'):
            test_shell.do_explain(self.gc, args)

            self.gc.schemas.get.assert_called_once_with('test')
Exemplo n.º 3
0
    def test_do_explain(self):
        input = {
            'page_size': 18,
            'id': 'pass',
            'schemas': 'test',
            'model': 'test',
        }
        args = self._make_args(input)
        with mock.patch.object(utils, 'print_list'):
            test_shell.do_explain(self.gc, args)

            self.gc.schemas.get.assert_called_once_with('test')
Exemplo n.º 4
0
    def test_do_explain(self):
        my_mocked_gc = self._mock_glance_client()

        class Fake():
            def __init__(self):
                self.page_size = 18
                self.id = 'pass'
                self.schemas = 'test'
                self.model = 'test'

        with mock.patch.object(utils, 'print_list'):
            test_shell.do_explain(my_mocked_gc, Fake())
Exemplo n.º 5
0
    def test_do_explain(self):
        my_mocked_gc = self._mock_glance_client()

        class Fake():
            def __init__(self):
                self.page_size = 18
                self.id = 'pass'
                self.schemas = 'test'
                self.model = 'test'

        with mock.patch.object(utils, 'print_list'):
            test_shell.do_explain(my_mocked_gc, Fake())
Exemplo n.º 6
0
    def test_do_explain(self):
        my_mocked_gc = mock.Mock()
        my_mocked_gc.schemas.return_value = 'test'
        my_mocked_gc.get.return_value = {}

        class Fake():
            def __init__(self):
                self.page_size = 18
                self.id = 'pass'
                self.schemas = 'test'
                self.model = 'test'

        with mock.patch.object(utils, 'print_list'):
            test_shell.do_explain(my_mocked_gc, Fake())