def test_update_env_return_new_status(self, mock_deployments_list): mock_deployments_list.return_value = [] mock_env = mock.Mock(id='foo_env_id', services=[], version=0, status=consts.STATUS_ID_READY) result = env_api._update_env(mock_env, self.mock_request) self.assertEqual(mock_env, result) self.assertEqual(consts.STATUS_ID_NEW, result.status) self.assertFalse(result.has_new_services)
def test_update_env_return_new_status(self, mock_deployments_list): mock_deployments_list.return_value = [] mock_env = mock.Mock(id='foo_env_id', services=[], version=0, status=consts.STATUS_ID_READY) result = env_api._update_env(mock_env, self.mock_request) self.assertEqual(mock_env, result) self.assertEqual(consts.STATUS_ID_NEW, result.status) self.assertFalse(result.has_new_services)