示例#1
0
 def test_default_params_is_all_args(self):
     self.assertEqual(ArgsKeyBit().params, '*')
示例#2
0
 def test_with_all_args(self):
     self.kwargs['params'] = '*'
     self.assertEqual(ArgsKeyBit().get_data(**self.kwargs), self.test_args)
示例#3
0
 def test_with_specified_args(self):
     self.kwargs['params'] = test_arg_idx = [0, 2]
     expected_args = [self.test_args[i] for i in test_arg_idx]
     self.assertEqual(ArgsKeyBit().get_data(**self.kwargs), expected_args)
示例#4
0
 def test_with_no_args(self):
     self.assertEqual(ArgsKeyBit().get_data(**self.kwargs), [])
示例#5
0
class RequestKeyConstructor(DefaultKeyConstructor):
    arguments = ArgsKeyBit()
    key_arguments = KwargsKeyBit()
    query_params = QueryParamsKeyBit()
    user = UserKeyBit()
    headers = HeadersKeyBit()
示例#6
0
class ScoreboardKeyConstructor(DefaultKeyConstructor):
    params_bit = QueryParamsKeyBit()
    args_bit = ArgsKeyBit()
    kwargs_bit = KwargsKeyBit()
示例#7
0
class ContestTaskSolvedKeyConstructor(DefaultKeyConstructor):
    args_bit = ArgsKeyBit()
    kwargs_bit = KwargsKeyBit()
示例#8
0
class ContestTaskListKeyConstructor(DefaultKeyConstructor):
    user_bit = UserKeyBit()
    args_bit = ArgsKeyBit()
    kwargs_bit = KwargsKeyBit()