예제 #1
0
 def test_configure_application_does_not_register_when_not_primary(self, cw, scrt, ipw, rc, lp, sl, scff, ssr):
     ipw.return_value = False
     mock_app = Mock()
     args = Mock(run=False)
     configure_application(mock_app, args)
     self.assertEqual(0, cw.call_count)
     self.assertEqual(0, scrt.call_count)
예제 #2
0
 def test_configure_application_does_not_register_when_runs_an_action_instance(self, cw, scrt, ipw, rc, lp, sl, scff, ssr):
     ipw.return_value = True
     mock_app = Mock()
     args = Mock(run=True)
     configure_application(mock_app, args)
     self.assertEqual(0, cw.call_count)
     self.assertEqual(0, scrt.call_count)
예제 #3
0
 def test_configure_application_register_thread(self, cw, scrt, ipw, rc, lp, sl, scff, ssr):
     ipw.return_value = True
     mock_app = Mock()
     args = Mock(run=False, upgrade=False)
     configure_application(mock_app, args)
     cw.assert_called_with()
     scrt.assert_called_with()
     ipw.assert_called_with()
     rc.assert_called_with(mock_app)
     lp.assert_called_with()
     sl.assert_called_with(mock_app)
     scff.assert_called_with(mock_app, args)
     ssr.assert_called_with(mock_app)