Beispiel #1
0
 def test_default_params_is_all_args(self):
     self.assertEqual(KwargsKeyBit().params, '*')
Beispiel #2
0
 def test_resulting_dict_specified_kwargs(self):
     keys = ['one', 'not_existing_param']
     expected_kwargs = {'one': self.test_kwargs['one']}
     self.kwargs['params'] = keys
     self.assertEqual(KwargsKeyBit().get_data(**self.kwargs), expected_kwargs)
Beispiel #3
0
 def test_resulting_dict_no_kwargs(self):
     self.assertEqual(KwargsKeyBit().get_data(**self.kwargs), {})
Beispiel #4
0
 def test_resulting_dict_all_kwargs(self):
     self.kwargs['params'] = '*'
     self.assertEqual(KwargsKeyBit().get_data(**self.kwargs), self.test_kwargs)
Beispiel #5
0
class RequestKeyConstructor(DefaultKeyConstructor):
    arguments = ArgsKeyBit()
    key_arguments = KwargsKeyBit()
    query_params = QueryParamsKeyBit()
    user = UserKeyBit()
    headers = HeadersKeyBit()
Beispiel #6
0
class ScoreboardKeyConstructor(DefaultKeyConstructor):
    params_bit = QueryParamsKeyBit()
    args_bit = ArgsKeyBit()
    kwargs_bit = KwargsKeyBit()
Beispiel #7
0
class ContestTaskSolvedKeyConstructor(DefaultKeyConstructor):
    args_bit = ArgsKeyBit()
    kwargs_bit = KwargsKeyBit()
Beispiel #8
0
class ContestTaskListKeyConstructor(DefaultKeyConstructor):
    user_bit = UserKeyBit()
    args_bit = ArgsKeyBit()
    kwargs_bit = KwargsKeyBit()