def test_buildItemUrl_should_build_url_from_params_collection(self): input = {"some_other_param":"some_value", "some_param":"some_other_value"} utils = YouTubeUtils() result = utils.buildItemUrl(input) assert(result == "some_param=some_other_value&some_other_param=some_value&")
def test_buildItemUrl_should_ignore_items_in_blacklist(self): input = {"path":"FAIL","thumbnail":"FAIL", "Overlay":"FAIL", "icon":"FAIL", "next":"FAIL", "content":"FAIL" , "editid":"FAIL", "summary":"FAIL", "published":"FAIL","count":"FAIL","Rating":"FAIL","Plot":"FAIL","Title":"FAIL","new_results_function":"FAIL","some_other_param":"some_value"} utils = YouTubeUtils() result = utils.buildItemUrl(input) assert(result.find("FAIL") < 0)
def test_buildItemUrl_should_append_to_existing_url(self): input = {"some_other_param":"some_value", "some_param":"some_other_value"} utils = YouTubeUtils() result = utils.buildItemUrl(input, "myfirst_url?") assert(result == "myfirst_url?some_param=some_other_value&some_other_param=some_value&")
def test_buildItemUrl_should_build_url_from_params_collection(self): input = { "some_other_param": "some_value", "some_param": "some_other_value" } utils = YouTubeUtils() result = utils.buildItemUrl(input) assert (result == "some_param=some_other_value&some_other_param=some_value&")
def test_buildItemUrl_should_append_to_existing_url(self): input = { "some_other_param": "some_value", "some_param": "some_other_value" } utils = YouTubeUtils() result = utils.buildItemUrl(input, "myfirst_url?") assert ( result == "myfirst_url?some_param=some_other_value&some_other_param=some_value&" )
def test_buildItemUrl_should_ignore_items_in_blacklist(self): input = { "path": "FAIL", "thumbnail": "FAIL", "Overlay": "FAIL", "icon": "FAIL", "next": "FAIL", "content": "FAIL", "editid": "FAIL", "summary": "FAIL", "published": "FAIL", "count": "FAIL", "Rating": "FAIL", "Plot": "FAIL", "Title": "FAIL", "new_results_function": "FAIL", "some_other_param": "some_value" } utils = YouTubeUtils() result = utils.buildItemUrl(input) assert (result.find("FAIL") < 0)