Пример #1
0
 def test_handle_calls_handle_label(self):
     namespace = argparse.Namespace(label='foobar')
     command = SingleLabelCommand()
     command.handle_label = mock.Mock()
     command.handle(namespace)
     self.assertEqual(command.handle_label.call_args_list, [
         arg('foobar', namespace),
     ])
Пример #2
0
 def test_handle_calls_handle_label(self):
     namespace = argparse.Namespace(label='foobar')
     command = SingleLabelCommand()
     command.handle_label = mock.Mock()
     command.handle(namespace)
     self.assertEqual(command.handle_label.call_args_list, [
         arg('foobar', namespace),
     ])
Пример #3
0
 def test_handle_raise_if_handle_label_not_implemented(self):
     command = SingleLabelCommand()
     with self.assertRaises(NotImplementedError):
         command.handle(argparse.Namespace(label='foo'))
Пример #4
0
 def test_handle_raise_if_handle_label_not_implemented(self):
     command = SingleLabelCommand()
     with self.assertRaises(NotImplementedError):
         command.handle(argparse.Namespace(label='foo'))