def test_convert_task_bits_deals_with_both_pos_args_and_kw_args(self): func, pos_args, kwargs = tasks.convert_task_bits('func:arg,kw=arg') self.assertEqual('func', func) self.assertSequenceEqual(('arg',), pos_args) self.assertDictEqual({'kw': 'arg'}, kwargs)
def test_convert_task_bits_deals_with_function_and_multiple_pos_args(self): func, pos_args, kwargs = tasks.convert_task_bits('func:arg1,arg2') self.assertEqual('func', func) self.assertSequenceEqual(('arg1', 'arg2'), pos_args) self.assertDictEqual({}, kwargs)
def test_convert_task_bits_deals_with_function_and_multiple_kw_args(self): func, pos_args, kwargs = tasks.convert_task_bits('func:kw1=arg1,kw2=arg2') self.assertEqual('func', func) self.assertSequenceEqual((), pos_args) self.assertDictEqual({'kw1': 'arg1', 'kw2': 'arg2'}, kwargs)
def test_convert_task_bits_deals_with_lone_function(self): func, pos_args, kwargs = tasks.convert_task_bits('func') self.assertEqual('func', func) self.assertSequenceEqual((), pos_args) self.assertDictEqual({}, kwargs)
def test_convert_task_bits_deals_with_both_pos_args_and_kw_args(self): func, pos_args, kwargs = tasks.convert_task_bits('func:arg,kw=arg') self.assertEqual('func', func) self.assertSequenceEqual(('arg', ), pos_args) self.assertDictEqual({'kw': 'arg'}, kwargs)
def test_convert_task_bits_deals_with_function_and_multiple_kw_args(self): func, pos_args, kwargs = tasks.convert_task_bits( 'func:kw1=arg1,kw2=arg2') self.assertEqual('func', func) self.assertSequenceEqual((), pos_args) self.assertDictEqual({'kw1': 'arg1', 'kw2': 'arg2'}, kwargs)