Skip to content

Instantly share code, notes, and snippets.

@luiscastillocr
Created April 23, 2013 15:26
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 luiscastillocr/5444519 to your computer and use it in GitHub Desktop.
Save luiscastillocr/5444519 to your computer and use it in GitHub Desktop.
from base import http_get, url_builder, compare_expected_data_structure
import settings
def delete_route(route_id):
querystring = "delete_route?route_id=%s" % route_id
result = http_get(url_builder(querystring), 'oauth')
expected = '{"result":{"status":1,"output":[],"errors":[]}}'
compare_expected_data_structure(expected, result.text)
#some tests required as input the route_key, that's why the method below has created
def delete_route_key(route_key):
querystring = "delete_route?r=&route_key=%s&route_id=" % route_key
result = http_get(url_builder(querystring), 'oauth')
expected = '{"result":{"status":1,"output":[],"errors":[]}}'
compare_expected_data_structure(expected, result.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment