summaryrefslogtreecommitdiff
path: root/troveclient/tests/test_client.py
Commit message (Collapse)AuthorAgeFilesLines
* 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: Ib83e626f51e6e01898bb7931c1660a1a548500f3 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Replace assertRaisesRegexp with assertRaisesRegexChuck Short2018-08-271-2/+2
| | | | | | | | This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex(). Change-Id: Ib260a6549a7a957fc1b91b89156a676922142b04 Signed-off-by: Chuck Short <chucks@redhat.com>
* 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
* Replace assertDictEqualjiansong2016-07-291-1/+1
| | | | | | | | | | | | Here,assertDictEqual is test that two dictionaries are equal.This method will be used by default to compare dictionaries in calls to assertEqual. So,I replace assertDictEqual. refer to [1] for more information [1]:https://docs.python.org/2.7/library/unittest.html#unittest.TestCase.assertDictEqual Change-Id: Idb30eeab13e9cad44e7c78c7903280f5e3bf66d6
* switch to keystoneauthSteve Martinelli2016-05-221-1/+1
| | | | | | | move troveclient to keystoneauth as keystoneclient's auth session, plugins and adapter code has been deprecated. Change-Id: I3d57dde9c013038accbab8cc30d9622a142d0f71
* remove unnecessary message when running unit testZhiqiang Fan2015-10-211-2/+3
| | | | | | | | | | | | | When we test log related code, we still print the tested log message into stderr, which is not quite useful for developers, we should mock those message. Package fixtures.FakeLogger already provides an option to mock specified logger, so let's use it. Note: this patch also changes an unnecessary object attribute to local varible. Change-Id: I4bc5beaa4eba149f12c58f072fe66163aed8c0c8 Closes-Bug: #1500236
* Added more unit-tests to improve code coverageSushil Kumar2015-06-081-3/+451
| | | | | | | | | | | | | | | | | Following files were too low on code coverage, so the coverage has been enhanced with addition of more unit-tests. - troveclient/client.py - troveclient/v1/shell.py The methodology to test shell.py has been motivated from the one used by python-novaclient to test novaclient/v2/shell.py Also, found an unmocked entry in test_secgroups.py, which was causing intermittent failure while writing the tests for shell.py. Closes-Bug: #1455856 Change-Id: I6a148fb5caad6a83b6ac23411b6458f231064ead
* Corrects order of parameters to assertEqualSushil Kumar2015-04-281-1/+1
| | | | | | | | | | The correct order of parameters to assertEqual is (expected, actual). It makes the assertion message more meaningful when there is a failure. Change-Id: Ifd35dbf6a6157c6ec7607e8ace6757b12f47657d Closes-Bug: #1277104
* 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
* Ignore fewer PEP8/flake8 rulesDenis Makogon2013-12-101-5/+6
| | | | | | | | | | | | 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-10/+16
| | | | | | * Added HP copyrights as appropriate Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
* Massive refactoring to the troveclientMichael Basnight2013-10-091-310/+27
| | | | | | | | | | | | | | | | 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-5/+3
| | | | | Change-Id: Ife06919f321ab4ad73bece2e6080fbd7d947eeef Fixes: bug #1219014
* Start using pyflakesDirk Mueller2013-06-261-3/+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/+322
Implements Blueprint reddwarf-trove-rename Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf