

@mock.patch.object(glance.api, 'glance')
def test_resource_types_get_list(self, gc):
    request = self.mock_rest_request(**{
        'GET': {
            
        },
    })
    gc.metadefs_resource_types_list.return_value = [{
        'created_at': '2015-08-21T16:49:43Z',
        'name': 'OS::Glance::Image',
        'updated_at': '2015-08-21T16:49:43Z',
    }, {
        'created_at': '2015-08-21T16:49:43Z',
        'name': 'OS::Cinder::Volume',
        'updated_at': '2015-08-21T16:49:43Z',
    }]
    response = glance.MetadefsResourceTypesList().get(request)
    request.assertStatusCode(response, 200)
    self.assertEqual(response.json, {
        'items': [{
            'created_at': '2015-08-21T16:49:43Z',
            'name': 'OS::Glance::Image',
            'updated_at': '2015-08-21T16:49:43Z',
        }, {
            'created_at': '2015-08-21T16:49:43Z',
            'name': 'OS::Cinder::Volume',
            'updated_at': '2015-08-21T16:49:43Z',
        }],
    })
    gc.metadefs_resource_types_list.assert_called_once_with(request)

dataset/ETHPy150Open openstack/horizon/openstack_dashboard/test/api_tests/glance_rest_tests.py ImagesRestTestCase.test_resource_types_get_list/VarMisuse@105/212 `self`->`request`