Harvard-University-iCommons/canvas_python_sdk — pull request #6 by eparker71 (2014-06-19 21:02:24+00:00)
Title: Feature/util methods

created file utils.py and test_utils.py, utils.py contains two methods build_url and validate_attr_is_acceptable which are used by the SDK. The first simply builds a url given a path and base api url which is defined in the config.py file or given directly to the method. The second, validate_attr_is_acceptable, takes a value and list of values to check against. It checks to see that the value is included in the list of acceptable values. There is an optional argument for allowing a None value.