fixed unit tests when env vars are set
Change-Id: Ia73c10c7c81b9434895941ea29282dbcdc667556
This commit is contained in:
		@@ -387,6 +387,17 @@ class TestSubcommandHelp(unittest.TestCase):
 | 
			
		||||
 | 
			
		||||
class TestParsing(unittest.TestCase):
 | 
			
		||||
 | 
			
		||||
    def setUp(self):
 | 
			
		||||
        super(TestParsing, self).setUp()
 | 
			
		||||
        self._orig_environ = os.environ.copy()
 | 
			
		||||
        keys = os.environ.keys()
 | 
			
		||||
        for k in keys:
 | 
			
		||||
            if k in ('ST_KEY', 'ST_USER', 'ST_AUTH'):
 | 
			
		||||
                del os.environ[k]
 | 
			
		||||
 | 
			
		||||
    def tearDown(self):
 | 
			
		||||
        os.environ = self._orig_environ
 | 
			
		||||
 | 
			
		||||
    def _make_fake_command(self, result):
 | 
			
		||||
        def fake_command(parser, args, thread_manager):
 | 
			
		||||
            result[0], result[1] = swiftclient.shell.parse_args(parser, args)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user