summaryrefslogtreecommitdiff
path: root/troveclient/tests/test_base.py
Commit message (Collapse)AuthorAgeFilesLines
* Use unittest.mock instead of third party mockSean McGinnis2020-04-181-1/+1
| | | | | | | | 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: Ib83e626f51e6e01898bb7931c1660a1a548500f3 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Update hacking for Python33.3.1Andreas Jaeger2020-03-311-16/+16
| | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
* Fix show instance with integer name NotFoundrenminmin2018-01-161-0/+4
| | | | | | | Fix trove cli 'show' instance with integer name error Change-Id: Ic6a943b4d5980017915dd2c0361636877376c5cb Closes-bug: #1740015
* move old apiclient code out of openstack/commonSteve Martinelli2016-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | As part of the first community-wide goal [1], teams were asked to remove the openstack/common package of their projects if one existed. This was a byproduct of the old oslo-incubator form of syncing common functionality. The package, apiclient, was moved to a top level location and cliutils was moved to the common module. There are no oslo specific libraries, the recommended solution is to move it in tree and maintain it there. Specifically in this patch, I also rearranged some of the imports to make them match up with the hacking guidelines while I was re-ordering them for the refactor anyway. Lastly, the apiclient/fake_client.py was deleted since it was not used. [1] http://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html Change-Id: Ib7b691240b819c9c91b100ca47ffaba75b281c78
* Fix troveclient to support MistralMorgan Jones2016-05-261-4/+4
| | | | | | | | | | | | | | | Mistral gets confused by Trove's (aguably wrong) inclusion of a member called 'items' in the Pagenated object that Trove returns as the result of 'list' client methods. This change changes Pagenated to inherit from the 'list' class so that the items method is not required (and has the additional benefit of just generally being a better implementation of a list type result). Change-Id: I683120451f69f07f131e6fa422c082f85735b196 Closes-bug: 1585705 Depends-On: Id674ae57bfcdc5e09bde1e323a614b3a03a7cad3
* Merge "Change assertTrue(isinstance()) by optimal assert"Jenkins2016-01-081-2/+2
|\
| * Change assertTrue(isinstance()) by optimal assertyangyapeng2016-01-081-2/+2
| | | | | | | | | | | | | | | | Some of tests use different method of assertTrue(isinstance(A, B)), The correct way is to use assertIsInstance(A,B) provided by testtools Closes-bug: #1268480 Change-Id: I718b86e83b93a4e778710b9de895f2796a9b6d61
* | Replace assertEqual(None, *) with assertIsNone in testsShuquan Huang2015-12-171-1/+1
|/ | | | | | | | Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: Idd271edb45dafed10aad255267ff0b9722cabe2d Closes-bug: #1280522
* Fixes unit-test in troveclientSushil Kumar2015-04-081-14/+4
| | | | | | | | | | | | | 1. Renames tes___eq__ to be test___eq__, because earlier method was not being called. 2. Corrects the test-code in test___eq__, for the failures it gave when it started running. 3. Removes some unused code from tests, there were few lines/methods which were not used by tests just removed/updated them. Change-Id: I90aa8cb9bb9f5d15697f00df0ba1defa0ef7be59 Closes-Bug: #1441518
* Correct order of parameters to assertEqualAmrith Kumar2015-02-231-13/+13
| | | | | | | | | The correct order of parameters to assertEqual is (expected, actual). It makes the assertion message more meaningful when there is a failure. Change-Id: I1ab6933d2eee336b41f6ab791e32ad6eaa004a6b Partial-Bug: #1277104
* Add datastore filter to backup-listSteve Leon2014-06-031-3/+8
| | | | | | | | | | | | | | | This fix enhances the backup-list command to optionally receive a datastore name or ID to filter the backup list by. The filter is sent as a query string. To attach the query string to the URL and have it still work with the URL for pagination, i have made some changes in the way url with query strings are constructed. This includes the pagination URL. partially implements: blueprint backup-metadata Change-Id: I0b9ef3ec7f51ed76517a22f9c0edfdce3694a36f
* Merge "fixed several pep8 issues"Jenkins2014-05-281-2/+2
|\
| * fixed several pep8 issuesChristian Berendt2014-05-131-2/+2
| | | | | | | | | | | | | | | | | | | | * E265 block comment should start with '# ' * E128 continuation line under-indented for visual indent * E713 test for membership should be 'not in' Tested with pep8 version 1.5.6 (2014-04-14). Change-Id: If2853c79bea91ebef5cd97dff66788b46b174a9a
* | Enabled F821, H306, H402, and H404 flake8 ruleSushil Kumar2014-05-091-2/+2
|/ | | | | | | | | | | | | | Reasons: - F821 is disabled. - H306 is disabled. - H402 is disabled. - H404 is disabled. Changes: - Updates tox.ini to enable F821, H306, H402 and H404 rules. - Updates code for F821, H306, H402 and H404 violation. Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
* Merge "Remove dependent module py3kcompat"Jenkins2014-04-251-12/+4
|\
| * Remove dependent module py3kcompatllg82122014-02-181-12/+4
| | | | | | | | | | | | | | | | | | | | | | Module py3kcompat was removed from oslo-incubator, we can use six directly. * Sync commit of removing py3kcompat from oslo * use six replace usage of py3kcompat Change-Id: I15b9ffb10e2d5765a1ed07dd5fd4e2bf7b21ec49 Closes-Bug: #1280033
* | Merge "Replace assertEqual(None, *) with assertIsNone in tests"Jenkins2014-03-031-2/+2
|\ \
| * | Replace assertEqual(None, *) with assertIsNone in testsllg82122014-02-151-2/+2
| |/ | | | | | | | | | | | | | | Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: Ifbb144e26b62790d8b8ba9b5c3eea7d04844ee19 Closes-Bug:#1280522
* | Remove vim headerHe Yongli2014-02-161-2/+0
|/ | | | | | | | | | | No need to set tabstop tons of times, this can be set in your vimrc file instead. More disucssion: http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html Change-Id: I45766d91f0c0b3622bbdc7dc5517497c87ebee8c Closes-Bug: #1229324
* Use Resource() class from common Oslo codeekudryashova2014-01-281-0/+1
| | | | | | | | | | In the process of unification of the clients code we should reuse common functionality from Oslo. Resource() class from trove duplicates Oslo funclionality, so we replace it with inheritance Related to blueprint common-client-library-2 Change-Id: I9809bd3036a5b544b8ff011432f64dc5af793f61
* Adding pagination support for backupsRobert Myers2013-12-111-0/+61
| | | | | | | | | | * add a _pagination method to base Manager * switched existing paginated list to use the new method * removed description from backup list and added updated Implements: blueprint paginate-backup-list Change-Id: If33c55a35bae8ebd6ed654af5ce6dfd7f9e40096
* Ignore fewer PEP8/flake8 rulesDenis Makogon2013-12-101-59/+53
| | | | | | | | | | | | Reasons: - code should be pythonicaly clean, that is why number of ignored rules should reduced Changes: - E125, F811, H102, H103, F201, H23, H302, F841, H301, H702, H703 rules are now enabled Change-Id: Ibf4025162244d3c2f1278b49a76ec1527a729042
* Fixing copyright and license headersMichael Basnight2013-10-221-0/+19
| | | | | | * Added HP copyrights as appropriate Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
* Massive refactoring to the troveclientMichael Basnight2013-10-091-54/+60
| | | | | | | | | | | | | | | | The new client adheres to the standards of the other clients now. It prints out tables, uses ENVVAR's for auth, no longer stores pickled json in a login token, uses openstack common, and moves the cli operations into a v1 module for the future of trove when it has a v2 api. Please note for compatibility, the troveclient.compat module has the old cli. In order to deploy it, amend the setup.cfg to include the compat module. implements blueprint cli-compliance-upgrade Change-Id: Ie69d9dbc75ce90496da316244c97acca1877a327
* PEP8 with tox -epep8 check failsDenis M2013-08-301-1/+1
| | | | | Change-Id: Ife06919f321ab4ad73bece2e6080fbd7d947eeef Fixes: bug #1219014
* Start using pyflakesDirk Mueller2013-06-261-1/+0
| | | | | | | | Instead of globally disabling pyflakes warnings, disable only those that occur frequently and fix the rest. Enable gating on those. Change-Id: I774d809ebcda2339b30c104b031211a3b2c491bd
* Rename from reddwarf to trove.0.1.3Michael Basnight2013-06-211-0/+447
Implements Blueprint reddwarf-trove-rename Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf