summaryrefslogtreecommitdiff
path: root/openstackclient/tests/image/v2/fakes.py
Commit message (Collapse)AuthorAgeFilesLines
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-081-309/+0
| | | | | | | | 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
* Add create_one_image_member() in FakeImage class and update testHuanxuan Ao2016-07-151-7/+26
| | | | | | | | | Usually we use a fake object in unit test. To match the other test, add create_one_image_member() in FakeImage class in imagev2 to create a fake image member, delete the old data and update the unit test of image. Change-Id: I062a362b15db7e8bc89ec48c540d310199fd6c0b
* fix a few spelling mistakesgecong19732016-07-041-1/+1
| | | | | | | - overwriten should be overwritten - retrun should be return Change-Id: I1567402f4d5c7253e6a54d8753e3f201af7e6a54
* osc-lib: utilsDean Troyer2016-06-131-3/+2
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Add "image unset" commandsunyajing2016-05-281-0/+2
| | | | | | | | This patch add a command that supports unsetting image tags and properties Change-Id: I6f2cf45a61ff89da6664f3a34ae49fdd85d8c986 Closes-Bug:#1582968
* Fix image tests to use warlock resourcesDean Troyer2016-05-201-31/+14
| | | | | | | | | | We have been testing (incorrectly) Image v2 using our usual FakeResource objects, when the v2 API actually uses warlock schema modelled resources. Bring this to the tests (TestImageSet was already doing this) Change-Id: Ia6ed3a8e28a8961f770c241b49d47cce9ff328d3
* Fix mutable default arguments in testsTang Chen2016-04-201-2/+4
| | | | | | | | | | | | | | | | | | | Python’s default arguments are evaluated only once when the function is defined, not each time the function is called. This means that if you use a mutable default argument (like list and dict) and mutate it, you will and have mutated that object for all future calls to the function as well. More details about this wrong usage here: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments In unit tests, most FakeXXX classes' methods take mutable arguments with default values [] or {}. We should change them to None. Change-Id: Iea833b66aa1379829511ad5c6d4432b72f3488e2 Closed-bug: #1550320
* Fixed a bunch of spacingBrandon Palm2016-02-231-0/+2
| | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* Refactor TestImageCreate with FakeImage classxiexs2015-12-161-1/+1
| | | | | Change-Id: I0044df36bb4d761c7998dfc8aa9a86d21d81da83 Implements: blueprint improve-image-unittest-framework
* Introduce FakeImage classxiexs2015-12-021-0/+133
| | | | | | | | | | Introduce FakeImage to improve the current image unittest framework with following two advantages: 1. generate more than one faking images 2. all faking images generated by random Change-Id: Ide326fa2a047ddeea478bef97000083617a0b744 Implements: blueprint improve-image-unittest-framework
* Add tags to `image set`NiallBunting2015-10-061-0/+15
| | | | | | | | | | | | This adds --tag to the v2 version of `image set`. This is another step to compatability between the osc image api. Added merge of tags into existing tags and handling duplicates, and tests for same. Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Change-Id: Ie800fcbf8bbc0978c54ace3278750a18023e8ce4
* add image member commands for image APIchengkunye2015-07-201-0/+15
| | | | | | | | | This commit adds the following commands: image project add image project remove Closes-Bug: 1402420 Change-Id: I07954e9fa43a3ad6078dd939ecedf9f038299e7b
* Add image show testsDean Troyer2015-05-011-3/+90
| | | | | | | | | Image v2 uses warlock objects rather than the usua Resource objects so we need to test for those. This adds a subset of the Image v2 schema that should be enough to test for proper warlock image handling. Depends-On: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c Change-Id: Ib89cce87f110a554f40e726718e31d39b500a6ae
* Add arg to 'server image create' testsDean Troyer2014-11-141-1/+4
| | | | | | | The 'protected' column was not being checked. Also add it to image.fakes.IMAGE. Change-Id: Ie431e9871a7da78b5a3924bfbc51d5575d994d86
* Add server image create commandDean Troyer2013-11-181-1/+4
| | | | | | Translation of 'nova image-create', with tests! Change-Id: I8a833aeff6f291e4774063ed235876eb2ba9c13c
* Complete basic test infrastructureDean Troyer2013-11-181-0/+46
This finally gets all of the API tests into a common framework regarding test classes and so forth. Change-Id: If675347129c50dcba0bfc5b6c58f5a2ca57ff46c