コード例 #1
0
 def test_skip_bootstrap_wait(self):
     "Go directly to deploystatus if bootstrap is done"
     self.controller.finish()
     self.assertEqual(1, len(self.mock_submit.mock_calls))
     self.assertEqual(self.mock_controllers.mock_calls,
                      [call.use('deploystatus'),
                       call.use().render(ANY)])
コード例 #2
0
 def test_show_bootstrap_wait(self):
     "Go to bootstrap wait controller if bootstrap pending"
     self.mock_app.bootstrap = MagicMock(name="bootstrap")
     self.mock_app.bootstrap.running = MagicMock(name='running_future')
     self.mock_app.bootstrap.running.done = MagicMock(name='done')
     self.mock_app.bootstrap.running.done.return_value = False
     self.controller.finish()
     self.assertEqual(self.mock_controllers.mock_calls,
                      [call.use('bootstrapwait'),
                       call.use().render()])
コード例 #3
0
 def test_show_bootstrap_wait(self):
     "Go to bootstrap wait controller if bootstrap pending"
     self.mock_app.bootstrap = MagicMock(name="bootstrap")
     self.mock_app.bootstrap.running = MagicMock(name='running_future')
     self.mock_app.bootstrap.running.done = MagicMock(name='done')
     self.mock_app.bootstrap.running.done.return_value = False
     self.controller.finish()
     self.assertEqual(self.mock_controllers.mock_calls,
                      [call.use('bootstrapwait'),
                       call.use().render()])
コード例 #4
0
 def test_skip_bootstrap_wait(self):
     "Go directly to deploystatus if bootstrap is done"
     self.controller.finish()
     self.assertEqual(self.mock_controllers.mock_calls,
                      [call.use('deploystatus'),
                       call.use().render()])