Ejemplo n.º 1
0
 def test_execute_loader(self):
     run.execute_loader(TestLoader, sync=True)
     with db.session_scope() as session:
         self.assertEqual(session.query(SampleModel).count(), 1)
     with mock.patch("tests.steps.TestLoader.generate",
                     return_value=[None]):
             with self.assertRaises(TypeError):
                 run.execute_loader(TestLoader, sync=True)
Ejemplo n.º 2
0
 def test_execute_loader(self):
     run.execute_loader(TestLoader, sync=True)
     with db.session_scope() as session:
         self.assertEqual(session.query(SampleModel).count(), 1)
     with mock.patch("tests.steps.TestLoader.generate",
                     return_value=[None]):
         with self.assertRaises(TypeError):
             run.execute_loader(TestLoader, sync=True)
Ejemplo n.º 3
0
 def test_execute_no_loader(self):
     with self.assertRaises(TypeError):
         run.execute_loader("foo", sync=True)
Ejemplo n.º 4
0
 def test_execute_no_loader(self):
     with self.assertRaises(TypeError):
         run.execute_loader("foo", sync=True)
Ejemplo n.º 5
0
 def test_procces_corectly_created(self, *args):
     with mock.patch("tests.steps.TestLoader.procno", 20):
         procs = run.execute_loader(TestLoader)
         self.assertEqual(len(procs), 20)