~corey.bryant/python-novaclient/2.26.0

« back to all changes in this revision

Viewing changes to novaclient/tests/fixture_data/cloudpipe.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-09-18 08:52:31 UTC
  • mfrom: (1.1.35)
  • Revision ID: package-import@ubuntu.com-20140918085231-56hs515gp9zpb9sd
Tags: 1:2.19.0-0ubuntu1
* New upstream release.
* debian/control: Drop python-d2to1, python-httpretty as build dependency.
* debian/control: Add python-requests-mock as build dependency.
* debian/control: Add python-oslo.utils.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
# License for the specific language governing permissions and limitations
11
11
# under the License.
12
12
 
13
 
import httpretty
14
 
 
15
 
from novaclient.openstack.common import jsonutils
16
13
from novaclient.tests.fixture_data import base
17
14
 
18
15
 
24
21
        super(Fixture, self).setUp()
25
22
 
26
23
        get_os_cloudpipe = {'cloudpipes': [{'project_id': 1}]}
27
 
        httpretty.register_uri(httpretty.GET, self.url(),
28
 
                               body=jsonutils.dumps(get_os_cloudpipe),
29
 
                               content_type='application/json')
 
24
        self.requests.register_uri('GET', self.url(),
 
25
                               json=get_os_cloudpipe,
 
26
                               headers=self.json_headers)
30
27
 
31
28
        instance_id = '9d5824aa-20e6-4b9f-b967-76a699fc51fd'
32
29
        post_os_cloudpipe = {'instance_id': instance_id}
33
 
        httpretty.register_uri(httpretty.POST, self.url(),
34
 
                               body=jsonutils.dumps(post_os_cloudpipe),
35
 
                               content_type='application/json',
36
 
                               status=202)
 
30
        self.requests.register_uri('POST', self.url(),
 
31
                               json=post_os_cloudpipe,
 
32
                               headers=self.json_headers,
 
33
                               status_code=202)
37
34
 
38
 
        httpretty.register_uri(httpretty.PUT, self.url('configure-project'),
39
 
                               content_type='application/json',
40
 
                               status=202)
 
35
        self.requests.register_uri('PUT', self.url('configure-project'),
 
36
                                   headers=self.json_headers,
 
37
                                   status_code=202)