Skip to content

Instantly share code, notes, and snippets.

@RobertFischer
Created February 3, 2014 19:32
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 RobertFischer/8790715 to your computer and use it in GitHub Desktop.
Save RobertFischer/8790715 to your computer and use it in GitHub Desktop.
Why have static type safety when we can roll it ourselves?
@postcondition(http_code_error)
def ptest_bauth(base_url=config['base_url'], action='post', user=config['puser'],
pw=config['ppw'], header=config['pauth_header'], token=''):
valid_actions = ['post', 'delete']
if action not in valid_actions:
assert False, "framework error: action is not in " + str(valid_actions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment