b13c84b2ef

tests/unit/test_shell.py:TestParsing tests can fail if there are OS_* variables set in the environment. There is already code in the test setUp to remove ST_* variables, so we should do the same for OS_* variables. This patch also changes the mechanism used to remove and then restore any unwanted variables found in os.environ. The existing setUp() takes a copy of os.environ and then deletes any ST_* variables in the original. In tearDown() it sets os.environ as the copy. However, the environ imported into shell.py remains pointing to the original os.environ object. So after the first call to tearDown, subsequent mocking of os.environ has no effect on shell.environ. This renders some of the tests ineffective e.g. test_insufficient_env_vars_v3 is not actually setting any vars in shell.environ. The issue can be provoked by repeating a test: nosetests -w tests/unit/ test_shell.py:TestParsing.test_args_v3 \ test_shell.py:TestParsing.test_args_v3 The test will pass first time and fail second time. Change-Id: I5d100f81115e74878d510326acb5777e6a3626c8
Python bindings to the OpenStack Object Storage API
This is a python client for the Swift API. There's a Python API (the
swiftclient
module), and a command-line script
(swift
).
You can find the documentation online.
Development takes place via the usual OpenStack processes as outlined in the OpenStack wiki. The master repository is on GitHub.
This code is based on original the client previously included with OpenStack's swift The python-swiftclient is licensed under the Apache License like the rest of OpenStack.
Contents:
Description
Languages
Python
99.9%
Shell
0.1%