コード例 #1
0
ファイル: test_run.py プロジェクト: mardom/corral
 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)
コード例 #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)
コード例 #3
0
ファイル: test_run.py プロジェクト: mardom/corral
 def test_execute_no_loader(self):
     with self.assertRaises(TypeError):
         run.execute_loader("foo", sync=True)
コード例 #4
0
 def test_execute_no_loader(self):
     with self.assertRaises(TypeError):
         run.execute_loader("foo", sync=True)
コード例 #5
0
ファイル: test_run.py プロジェクト: EdwardBetts/corral
 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)