Exemple #1
0
 def test_push_with_ship_and_deploy_error(self, check_call):
     app = AppController(None, Settings())
     app._get_or_create_deployment = Mock(
         return_value=({'branch': 'default', 'name': 'dep'}, 'name'))
     args = Mock()
     args.name = 'app/dep'
     with self.assertRaises(InputErrorException) as sd:
         app.push(args)
     self.assertEqual(
         '[ERROR] --ship and --push options cannot be used simultaneously.',
         str(sd.exception))
Exemple #2
0
 def test_push_with_deploy(self, check_call):
     app = AppController(None, Settings())
     app.redeploy = Mock()
     app._get_or_create_deployment = Mock(
         return_value=({'branch': 'default'}, 'name'))
     args = Mock()
     args.name = 'app/dep'
     args.ship = False
     app.push(args)
     self.assertTrue(check_call.called)
     self.assertTrue(app.redeploy.called)