summaryrefslogtreecommitdiff
path: root/tests/unit/test_swiftclient.py
diff options
context:
space:
mode:
authorAlistair Coles <alistair.coles@hp.com>2014-10-20 10:41:34 +0100
committerAlistair Coles <alistair.coles@hp.com>2014-10-24 18:13:37 +0100
commit95056d1ef49730d98eda1fc246b7e4bb1070a311 (patch)
tree04c3a92ff65f7fb3abe48f3e7a84781e8397e48d /tests/unit/test_swiftclient.py
parent871a3e40f306f1bff056a86edcd644a82ab29c67 (diff)
downloadpython-swiftclient-95056d1ef49730d98eda1fc246b7e4bb1070a311.tar.gz
Make swift post output an error message when failing
swiftclient.shell.st_post was ignoring the result dict returned from SwiftService.post and therefore giving no indication when posts failed e.g. due to invalid auth credentials. This patch ensures that SwiftService always returns a result_dict from post() and then checks the result dict. On failure the shell now outputs the ClientException message and exits with error code 1. Also adds unit tests and cleans up some unnecessary mocked return values in existing tests. Closes-Bug: 1383243 Change-Id: I111150eb3d026c8d01c2cac13d3613ca7304e5b9
Diffstat (limited to 'tests/unit/test_swiftclient.py')
0 files changed, 0 insertions, 0 deletions