horizon/openstack_dashboard/api
Akihiro Motoki 64d5ba8515 Improve mocking in REST API tests (test_cinder)
The current REST API tests have a lot of rooms to be improved like:
- mocking the whole module of the API wrapper
- Use test_data.cinder_data
- Use response.json attribute to decode responses as much as possible

APIResourceWrapper.to_dict() method of openstack_dashboard.api.base
is changed to refer attributes of an object itself instead of
self._apiresource. There is a case where APIResourceWrapper class
defines its own attributes and such attributes should be used in
to_dict() method. If self._apiresouce is referred these attributes
are not considered. We need to consume attributes of a class object
itself. It helps us write unit tests using sample test data.

Change-Id: I5b0c3bb52d97f377c6e5fe2b9a4ace2931114ab0
Partial-Bug: #1752917
2018-03-13 12:27:01 +09:00
..
rest django2: is_authenticated/is_anonymous is now property only 2018-02-17 01:36:54 +09:00
__init__.py Drop Heat related code from horizon 2017-12-05 07:38:55 +00:00
base.py Improve mocking in REST API tests (test_cinder) 2018-03-13 12:27:01 +09:00
cinder.py Start using create_mocks in dashboards/admin/volumes/tests.py 2018-02-27 16:40:24 +04:00
glance.py Clean /tmp after upload when using glance v2 client 2017-08-04 10:54:51 +08:00
keystone.py Add Change Password Action for Angular users panel 2018-01-16 18:15:19 +09:00
microversions.py API micro-version support for multiple features 2017-12-03 07:59:32 +09:00
network.py Move SG and FIP API wrapper to api.neutron 2017-06-04 17:51:25 +00:00
neutron.py Cache neutron extension list across requests 2018-02-10 15:12:09 +09:00
nova.py Convert admin.aggregates tests into mock 2018-03-02 11:25:54 +04:00
swift.py Use flake8-import-order plugin 2017-07-03 08:02:23 +00:00