def test_default_params_is_all_args(self): self.assertEqual(KwargsKeyBit().params, '*')
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)
def test_resulting_dict_no_kwargs(self): self.assertEqual(KwargsKeyBit().get_data(**self.kwargs), {})
def test_resulting_dict_all_kwargs(self): self.kwargs['params'] = '*' self.assertEqual(KwargsKeyBit().get_data(**self.kwargs), self.test_kwargs)
class RequestKeyConstructor(DefaultKeyConstructor): arguments = ArgsKeyBit() key_arguments = KwargsKeyBit() query_params = QueryParamsKeyBit() user = UserKeyBit() headers = HeadersKeyBit()
class ScoreboardKeyConstructor(DefaultKeyConstructor): params_bit = QueryParamsKeyBit() args_bit = ArgsKeyBit() kwargs_bit = KwargsKeyBit()
class ContestTaskSolvedKeyConstructor(DefaultKeyConstructor): args_bit = ArgsKeyBit() kwargs_bit = KwargsKeyBit()
class ContestTaskListKeyConstructor(DefaultKeyConstructor): user_bit = UserKeyBit() args_bit = ArgsKeyBit() kwargs_bit = KwargsKeyBit()