summaryrefslogtreecommitdiff
path: root/glanceclient/tests/unit/v1/test_shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Do not use the six library in the tests.Cyril Roelandt2020-06-151-11/+5
| | | | Change-Id: Ic8a2a736a733e0151ca82f19bfde428dc04cf255
* Use unittest.mock instead of third party mockSean McGinnis2020-04-181-1/+2
| | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I446ee142c7a17446372c910f7f2a36d55df18e04 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Update hacking versionjacky062019-03-271-4/+4
| | | | | | Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: Ifc3b96d98c1a7feff187f953d487e12135887fb9
* py3: Fix encoding and use sys.stdin.bufferSirushti Murugesan2016-07-251-2/+2
| | | | | | | | | * exc.py: Encode body in response before calling replace over it. * http.py: prepend the bytes literal to the empty string or else we hit bug 1342080 again in python 3. * utils.py: Use sys.stdin.buffer in python 3. Change-Id: Ieefb8c633658e507486438e5518c5d53e819027d
* Enable hacking checksTin Lam2016-04-181-6/+5
| | | | | | | | | | Enabled following hacking checks from tox.ini: - H233 Python 3.x incompatible use of print operator - H303 no wildcard import - H404 multi line docstring should start with a summary Change-Id: I2553bcd3e80c00acc08d135a1d2dadfb6cda49fe Partial-Bugs: #1475054
* Require disk and container format on image-createGorka Eguileor2015-08-141-0/+44
| | | | | | | | | | | | | | | Currently glanceclient doesn't enforce disk-format or container-format presence in the command line on image-create when providing image data (with --file, --location, --copy-from), which means that the POST request is made with the whole image and error is reported by Glance API. This post enforces presence of those arguments when image data is provided so we can get the error quicker and avoid sending unnecessary data over the network. Change-Id: I5914fa9cfef190a028b374005adbf3a804b1b677 Closes-Bug: #1309272
* Enable flake8 checksDarja Shakhray2015-07-211-6/+12
| | | | | | | | | | | | This commit enables new flake8 checks: * E265 block comment should start with '# ' * H405 multi line docstring summary not separated with an empty line * E123 closing bracket does not match indentation of opening bracket's line * H238 old style class declaration, use new style (inherit from `object`) * E128 continuation line under-indented for visual indent and makes related changes in the code. Change-Id: Ie993afc930f6b74d7a990bcaa9fc0e9f5ba1585c
* Merge "Add parameter 'changes-since' for image-list of v1"Jenkins2015-06-151-0/+57
|\
| * Add parameter 'changes-since' for image-list of v1Fei Long Wang2015-05-061-0/+57
| | | | | | | | | | | | | | | | | | | | Now Glance /images/detail API of v1 supports parameter 'changes-since' to query deleted images. But it's missed in client. This patch will add the parameter. Related-Bug: #1432701 Change-Id: Id38e3a78b4b2ef680ea04d35e32beb4b9c8efa00
* | Use assertIn instead of assertTrue in testsKamil Rykowski2015-04-291-2/+2
|/ | | | | | | Since `assertIn` is provided for checking if value exists in given container, it is not formal to use `assertTrue` for it. Change-Id: Ie1392839b5ca436957463bb29f2784d48cfcbf75
* Move unit tests to standard directoryStuart McLaren2015-04-181-0/+503
This patch moves the glanceclient unit tests to the standard directory (xxxclient/tests/unit) in preparation for adding functional gate tests 'check-glanceclient-dsvm-functional' in the same vein as existing client tests for other projects, eg: * check-novaclient-dsvm-functional * check-keystoneclient-dsvm-functional * check-neutronclient-dsvm-functional Change-Id: I29d4b9e3a428c851575ee9afde40d6df583456c4