def test_check_params_multiple_unknown_params(): params = {'not_a_param': 'some text', 'not_a_param1': 'some text', 'not_a_param2': 'some text', } unknown_params, bad_params = api.check_params(params) assert (len(unknown_params) == 3 and unknown_params[0] == "not_a_param" and unknown_params[1] == "not_a_param1" and unknown_params[2] == "not_a_param2")
def test_check_params_float_types_bad(params): unknown_params, bad_params = api.check_params(params) assert len(bad_params) == 1
def test_check_params_one_unknown_param(): params = {'not_a_param': 'some text'} unknown_params, bad_params = api.check_params(params) assert len(unknown_params) == 1 and unknown_params[0] == "not_a_param"
def test_check_params_all_good(params): unknown_params, bad_params = api.check_params(params) assert len(bad_params) == 0
def test_check_params_setdate_bad(params): unknown_params, bad_params = api.check_params(params) assert len(bad_params) == 1
def test_check_params_values_bad(params): unknown_params, bad_params = api.check_params(params) assert len(bad_params) == 1