Created
September 2, 2015 21:58
-
-
Save abought/3a78b86e9d3ce615e2ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A script to demonstrate how a particular function behaves with different inputs and outputs | |
""" | |
from website.util import api_v2_url | |
SCENARIOS = [ | |
('http://localhost:8000/', ''), | |
('http://localhost:8000/', 'v2/'), | |
('https://staging.osf.io/', 'api/v2'), | |
('https://staging2.osf.io/', 'v2'), | |
('https://api.staging.osf.io/', ''), | |
('https://api.staging.osf.io/', 'v2/') | |
] | |
ENDPOINT = "/users/4urxt/nodes/" | |
for scenario in SCENARIOS: | |
base_route, base_prefix = scenario | |
print "Called api_v2_url with arguments path_str='{}', base_route='{}', base_prefix='{}'".format(ENDPOINT, base_route, base_prefix) | |
print "\t Result:", api_v2_url(ENDPOINT, base_route=base_route, base_prefix=base_prefix) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment