Commit Graph

5 Commits

Author SHA1 Message Date
Takashi Natsume be9517cb02 Fix a fixture for keypairs tests
This patch is a follow-up for
I03570d0a49b73021de91dc50b65b1bbf5d4b878b.

The following file is for shell (CLI) tests,
so it does not need to be changed anymore.

* novaclient/tests/unit/v2/fakes.py

Change-Id: I3b1cf5d402b04854177265f2ba429956edb73203
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-08-05 23:58:30 +09:00
Jamie Lennox e88afc046b Clean up requests-mock usage
In line with other clients testing we've found that having the
requests-mock fixture at self.requests can be misleading for new people
as it looks like you're calling requests itself.

Also make use of some of the new features of requests-mock like query
parsing, json handling, method names.

Change-Id: Id61b88c53478d49f91c3f880ed5b90d638051ba0
2016-10-05 06:53:05 +11:00
Takashi NATSUME 0414bab3d3 Add return-request-id-to-caller function(3/5)
Add return-request-id-to-caller function to
resources and resource managers in the following files.
The methods in the resource class and resource manager return
a wrapper class that has 'request_ids' property.
The caller can get request ids of the callee via the property.

* novaclient/v2/keypairs.py
* novaclient/v2/limits.py
* novaclient/v2/networks.py
* novaclient/v2/quota_classes.py
* novaclient/v2/quotas.py
* novaclient/v2/security_group_default_rules.py
* novaclient/v2/security_group_rules.py
* novaclient/v2/security_groups.py
* novaclient/v2/server_groups.py
* novaclient/v2/services.py
* novaclient/v2/usage.py
* novaclient/v2/versions.py

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I9203f70a0eef5686b590fbff35563f2cf8b6f586
Implements: blueprint return-request-id-to-caller
2016-01-28 11:22:00 +00:00
Andrey Kurilin ccff3d3c94 Remove all imports from oslo namespace
oslo namespace is deprecated

Change-Id: I345eb210222d8e973b99f27821099f52883ab27d
2015-04-20 13:52:38 +03:00
Joe Gordon 3561772f8b Move unit tests into unit test directory
In order to pave the way for functional testing, move existing unit
tests into a directory labeled unit. A subsequent patch will add a
directory for functional tests.

Change-Id: I0adb8b9f14451acb382c725d31f5387b4b6d82bb
2015-01-27 13:06:06 -08:00