Exemplo n.º 1
0
 def test_get_action_from_reference_not_in_accumulator(self):
     arg = Argument('test', reference='a')
     with self.assertRaises(InvalidArgument):
         arg._get_action_from_reference({'b': 3, 'c': 7})
Exemplo n.º 2
0
 def test_get_action_from_reference(self):
     arg = Argument('test', reference='a')
     self.assertEqual(arg._get_action_from_reference({'a': 1, 'b': 3, 'c': 7}), 1)
Exemplo n.º 3
0
 def test_get_action_from_reference_empty_accumulator(self):
     arg = Argument('test', reference='a')
     with self.assertRaises(InvalidArgument):
         arg._get_action_from_reference({})