diff options
| author | Zuul <zuul@review.opendev.org> | 2021-03-20 02:27:54 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2021-03-20 02:27:54 +0000 |
| commit | 7c6b689fdd2712ddd19f14e5a6762acfe60d543c (patch) | |
| tree | 6a133c333a9d2fe3494d97332ec9c16f740e3258 /openstackclient | |
| parent | 86bca18b74539d024e3854af0dfd3552c4d3b50b (diff) | |
| parent | 4d3a3bb28f61a75c14a06e98dc0dd265308d658f (diff) | |
| download | python-openstackclient-7c6b689fdd2712ddd19f14e5a6762acfe60d543c.tar.gz | |
Merge "Remove unnecessary test"
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/tests/unit/test_shell.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/openstackclient/tests/unit/test_shell.py b/openstackclient/tests/unit/test_shell.py index 366c364e..bee2b401 100644 --- a/openstackclient/tests/unit/test_shell.py +++ b/openstackclient/tests/unit/test_shell.py @@ -15,7 +15,6 @@ import importlib import os -import sys from unittest import mock from osc_lib.tests import utils as osc_lib_test_utils @@ -412,32 +411,3 @@ class TestShellCli(TestShell): "network_api_version": LIB_NETWORK_API_VERSION } self._assert_cli(flag, kwargs) - - -class TestShellArgV(TestShell): - """Test the deferred help flag""" - - def test_shell_argv(self): - """Test argv decoding - - Python 2 does nothing with argv while Python 3 decodes it into - Unicode before we ever see it. We manually decode when running - under Python 2 so verify that we get the right argv types. - - Use the argv supplied by the test runner so we get actual Python - runtime behaviour; we only need to check the type of argv[0] - which will always be present. - """ - - with mock.patch( - self.shell_class_name + ".run", - self.app, - ): - # Ensure type gets through unmolested through shell.main() - argv = sys.argv - shell.main(sys.argv) - self.assertEqual(type(argv[0]), type(self.app.call_args[0][0][0])) - - # When shell.main() gets sys.argv itself it should be decoded - shell.main() - self.assertEqual(type(u'x'), type(self.app.call_args[0][0][0])) |
