summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/object
Commit message (Collapse)AuthorAgeFilesLines
* Fix functional tests for py3Eric Fried2020-01-281-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various things so the functional tests will work under python3: - A hashlib.md5() can only be update()d with an encoded string in py3. - There's no dict.iteritems(), change to dict.items() (which is already an iterator). - Open temp files with 'w+' mode rather than the default 'w+b' (as an alternative to encoding all the write and expected-read payloads as bytes). - (This is a weird one) Explicitly raise SkipTest from unittest (rather than unittest2, which is where cls.skipException landed). Not sure why this is busted, but this moves the ball. Conflict/issue with raising SkipTest on this branch. (cherry picked from commit f1d742f32adeb662a3fdf8fa3ef3bc391e71ed81) (cherry picked from commit b866202f54afddca66a77cd989b082e193a96956) Includes squash of: Before writing object data to stdout, re-open it in binary mode Otherwise, you can hit TypeErrors on Python3. Closes-Bug: 1775482 (cherry picked from commit 415b48056d9d021e04ec972029040a89a6b13928) Change-Id: Ic9b2b47848a600e87a3674289ae7ae8c3e091fee
* Use flake8-import-order pluginAkihiro Motoki2017-08-172-0/+2
| | | | | | | | | | | | | | | | In reviews we usually check import grouping but it is boring. By using flake8-import-order plugin, we can avoid this. It enforces loose checking so it sounds good to use it. This flake8 plugin is already used in tempest. Note that flake8-import-order version is pinned to avoid unexpected breakage of pep8 job. Setup for unit tests of hacking rules is tweaked to disable flake8-import-order checks. This extension assumes an actual file exists and causes hacking rule unit tests. Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
* Allow objects to be streamed to stdoutHonza Pokorny2017-07-052-0/+47
| | | | Change-Id: Icd8de6b2122fe77926d93da9bda08f56c3672a7a
* Add option "--name" to command "openstack object create"Rajasi Kulkarni2016-09-262-0/+24
| | | | | | | | | | | Option "--name" can be used to set as the object name of the file to be uploaded in the container. Similar to option "--object-name" in command "swift upload". Added unit test case to ensure an exception is raised when using option "--name" for uploading multiple objects. Change-Id: Ied7827841f6ca1cf9d4b48e304cbe5d62eda38ab Closes-Bug: #1607972
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-087-0/+1404
this will better isolate the unit tests from the functional tests. unfortunately, the "integration" tests had to be lumped into the "unit" tests since we need the separation in testr.conf Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded