Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Import image to store
- path = self._url('/v2/images/%s/import' % image_id)
- headers = self._headers({
- 'content-type': 'application/json',
- 'X-Roles': 'admin',
- })
- image_data_uri = 'http://localhost:%s/' % port
- data = jsonutils.dumps({'method': {
- 'name': 'web-download',
- 'uri': image_data_uri
- }})
- response = requests.post(path, headers=headers, data=data)
- self.assertEqual(http.ACCEPTED, response.status_code)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement