summaryrefslogtreecommitdiff
path: root/glanceclient/tests/unit/v1
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Unhardcode the value of DEFAULT_PAGE_SIZE from the tests"Zuul2023-02-091-14/+17
|\
| * Unhardcode the value of DEFAULT_PAGE_SIZE from the testsCyril Roelandt2022-11-141-14/+17
| | | | | | | | | | | | | | | | | | | | The value of DEFAULT_PAGE_SIZE (20) was hardcoded in multiple places in the tests, which means all the tests would break should we ever want to change that value. Co-Authored-By: 韩春蕾 <1922361860@qq.com> Change-Id: I6e8dbae32c3a24d3fbeebcea5bfe0dd9ae247035
* | Remove unicode-related Python2-only codeCyril Roelandt2022-11-141-2/+2
|/ | | | | | | | This commit: - removes the old "u" prefix from all strings - removes the unicode_key_value_to_string function Change-Id: I1da347e31e828fd2359f0935a4da47257116d4cb
* Do not use the six library in the tests.Cyril Roelandt2020-06-152-20/+10
| | | | 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
* Use correct order of arguments to assertEqualzhengyao12016-06-291-4/+4
| | | | | | | | | | | The correct order of arguments to assertEqual that is expected by testtools is (expected, observed). This patch fixes the inverted usage of arguments in some places that have cropped up since the last fix of this bug. Change-Id: If8c0dcb58496bc2fcf4c635f384522a1f7d2b2af Closes-Bug: #1259292
* 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
* Add versions list functionwangxiyuan2015-11-101-0/+79
| | | | | | | | | This patch add a function to query the Glance API versions. DocImpact Change-Id: I21eeaee3db4ae23f608b68bb319772ac612975b4 Closes-bug: #1511180
* 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-292-5/+5
|/ | | | | | | 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-184-0/+1591
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