3 Commits

Author SHA1 Message Date
Sean McGinnis
2b8282bb1e
Use unittest.mock instead of third party mock
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>
2020-04-18 11:59:46 -05:00
Sushil Kumar
5125628c28 Fixes unit-test in troveclient
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
2015-04-08 09:11:13 +00:00
Doug Shelley
df3afb2abc Add instance name as parameter to CLI
Allow CLI to take instance name as well as instance id for
sub-commands where instance can be specified. This commit
does not include the metadata-* commands as the backend for
that feature isn't merged. The spec will be adjusted to
reflect that they commands will be out of scope.

Affected sub-commands are:
backup-create
backup-list-instance
configuration-attach
configuration-default
configuration-detach
create (just for --replica_of)
database-create
database-delete
database-list
detach-replica
delete
resize-flavor
resize-instance
resize-volume
restart
root-enable
root-show
update
user-create
user-delete
user-grant-access
user-list
user-revoke-access
user-show
user-show-access
user-update-attributes

Unit tests were added to test passing in an instance object
for the affected sub-commands. A new set of unit tests were
added for databases.py (doesn't look like any existed before).

Change-Id: I5554a7d423990ff9cb24437a893d90d212b022b1
blueprint: add-instance-name-to-cli
2014-12-08 14:29:06 -05:00