summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/image/v1/fakes.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.imageStephen Finucane2023-05-101-7/+2
| | | | | | | | | | Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I6420ec6fd550903b03083b9b1f8391511913c86f Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* tests: Update fake image client in testsStephen Finucane2021-11-171-3/+5
| | | | | | | | | | | These clients are intended to fake out the old glanceclient client which we no longer use. They were only "working" because we weren't actually using any of the glancelclient-based stuff and were instead overriding everything within the tests. Move these overrides back to the main fake client and remove the crud. Change-Id: I92ee74a1df72a6dd23f9d2dc04342aab0cbd3210 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* image: Remove FakeImage test helperStephen Finucane2021-11-171-41/+33
| | | | | | | | | We're no longer creating fake versions of glanceclient's 'Resource' object but rather openstacksdk objects. As such, there's no point nesting things under a fake resource class. Change-Id: I39cd5302622f4542db9eebcccfad0cb90d077441 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* image: Remove dead test helper methodsStephen Finucane2021-11-171-31/+0
| | | | | | | | | These haven't been used since we switched the image commands from glanceclient to openstacksdk. There's more cleanup to be done here but that can be done later. Change-Id: I3de1f24323886b122b3a30660fb3de18eb7014e9 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Complete switch from glanceclient to SDK for image serviceArtem Goncharov2020-03-241-6/+4
| | | | | | | | | In https://review.opendev.org/#/c/650374/ a work has been started to switch image service support from glanceclient with all it's dependencies to the SDK version. With this change version 1 (anyway deprecated since ages) is also being switched to SDK. Change-Id: Ic391500af02a73d81d64a9e9113cca85c9e24390
* Raise flake8-import-order version to latestSean McGinnis2020-01-101-2/+1
| | | | | | | | | | | We had this library capped at a release that is a few years old. Now that we have dropped py2 testing, we can pick up the latest version. This uncovered a few things to clean up. Mostly the fact that mock is now a part of the StdLib unittest since Python 3.3. Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Fix 'project purge' deletes ALL images problemlihaijing2017-09-261-0/+1
| | | | | Closes-Bug: #1717130 Change-Id: I33c6fc7897dfee85d1c197a1267bde4abfa5bbd9
* Use flake8-import-order pluginAkihiro Motoki2017-08-171-1/+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
* To display image size in human friendly formatBadhmapriya Boopalan2017-01-111-0/+2
| | | | | | | | | | Include option '--human-readable' to 'image show' command. This option displays image size in human readable format (such as K, M, G, T,..) Related Commit: I0ef74c2ec978483fe49156c88acf5c369a8fa5c2 Closes-Bug: #1640086 Change-Id: I28cd5702925d51303d0607ed8dccf12c56434682
* Refactor image v1 unit tests with FakeImage classHuanxuan Ao2016-10-091-0/+44
| | | | | | | | Add FakeImage class, and refactor the unit tests with it in image v1. Change-Id: I9024ca5eca5c604e7588c1d905562bf6838309f1 Implements: bp improve-image-unittest-framework
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-081-0/+76
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