Skip to content

Instantly share code, notes, and snippets.

@notmyname
Created August 1, 2015 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmyname/6d4f936215edc2ad59b0 to your computer and use it in GitHub Desktop.
Save notmyname/6d4f936215edc2ad59b0 to your computer and use it in GitHub Desktop.
def delete_json_accept(url, token, parsed, conn):
conn.request('DELETE', '%s/%s/%s' % (parsed.path, self.container,
uuid4()),
'', {'X-Auth-Token': token,
'Accept': 'application/json'})
return check_response(conn)
resp = retry(delete_json_accept)
print resp.read()
print resp.headers
self.assertEqual(resp.status, 404)
self.assertEqual(resp.getheader('Content-Type'),
'application/json')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment