def test_get_compared_key_with_key_string(self): def query_args_func(key): args = {"compared": "1"} return args.get(key, []) compared = get_compared_value(query_args_func) self.assertTrue(compared)
def test_get_compared_key_with_key_list(self): def query_args_func(key): return [1, 2, 0] compared = get_compared_value(query_args_func) self.assertFalse(compared)
def test_get_compared_key_no_key(self): def query_args_func(key): return None compared = get_compared_value(query_args_func) self.assertFalse(compared)