Exemple #1
0
 def test_add_arguments(self):
     c = crd.Command()
     parser = MagicMock()
     c.add_arguments(parser)
     parser.add_argument.assert_called_once_with(
         '--number',
         dest='number',
         help="how many would you like to create",
         default=100
     )
Exemple #2
0
 def test_handle_default_100(self):
     com = crd.Command()
     with patch.object(crd.PatientGenerator, 'make') as maker:
         com.handle(number=None)
         self.assertEqual(100, maker.call_count)
Exemple #3
0
 def test_handle(self):
     com = crd.Command()
     with patch.object(crd.PatientGenerator, 'make') as maker:
         com.handle(number='23')
         self.assertEqual(23, maker.call_count)