예제 #1
0
 def test_setup_pipeline_fail(self):
     with self.assertRaises(TypeError):
         setup.setup_pipeline(None)
예제 #2
0
 def test_setup_pipeline_fail(self):
     with self.assertRaises(TypeError):
         setup.setup_pipeline(None)
예제 #3
0
 def test_setup_pipeline(self):
     with mock.patch("atexit.register") as register:
         with mock.patch.object(TestPipeline, "setup") as pipeline_setup:
             setup.setup_pipeline(TestPipeline)
             self.assertTrue(pipeline_setup.called)
             register.assert_called_with(TestPipeline().teardown)
예제 #4
0
 def test_setup_pipeline(self):
     with mock.patch("atexit.register") as register:
         with mock.patch.object(TestPipeline, "setup") as pipeline_setup:
             setup.setup_pipeline(TestPipeline)
             self.assertTrue(pipeline_setup.called)
             register.assert_called_with(TestPipeline().teardown)