Sorry for asking in dev maillist, but it really looks like dev issue.

I'm writing  application which relies on novaclient, glanceclient, etc.

It's almost done, but I thought about adding end to end tests by recording and actual requests and replies to openstack. I used httpretty library for this. Unfortunately, it ignores all requests and unable to record them.

Does someone knew anything about httpretty and novaclient interaction? (I think keystoneauth1 and other openstack clients behaves the same way?).

Code example:

import httpretty
from keystoneauth1 import identity
from keystoneauth1 import session
import novaclient.client
auth_data = {'tenant_name':'any', 'username': 'any', 'password': 'any', 'auth_url': 'https://google.com/does-not-matter/'}
with httpretty.HTTPretty.record('test.json'):
    auth = identity.v2.Password(**auth_data)
    s = session.Session(auth=auth)
    cl = novaclient.client.Client('2', session=s)
    z = cl.flavors.find(name='SSD.30')


Thanks!


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to