Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PC-30546)[API] feat: delete future offer when early publish #12935

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

qdasilva-pass
Copy link
Contributor

But de la pull request

Ticket Jira : https://passculture.atlassian.net/browse/PC-30546

Vérifications

  • J'ai écrit les tests nécessaires
  • J'ai relu attentivement les migrations, en particulier pour éviter les locks, et je préviens les équipes Shérif et Data
  • J'ai ajouté des screenshots pour d'éventuels changements graphiques

@qdasilva-pass qdasilva-pass force-pushed the qds_PC-30546_future_offer_early_publish branch from 6a35c41 to edef1d7 Compare June 25, 2024 15:38
@qdasilva-pass qdasilva-pass marked this pull request as ready for review June 25, 2024 16:11

assert response.status_code == 200
offer = offers_models.Offer.query.get(stock.offer.id)
assert offer.publicationDate is None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus : tu pourrais vérifier également que :

  • l'offre est désormais active ;
  • l'offre a bien été indexée : mock_async_index_offer_ids.assert_called() ;
  • la ligne a bien été supprimée de la table (objet du ticket) : models.FutureOffer.query.count() == 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effectivement le test était un peu léger. Merci pour les suggestions, je les ai ajoutées :)

@qdasilva-pass qdasilva-pass force-pushed the qds_PC-30546_future_offer_early_publish branch from edef1d7 to ecd174b Compare June 26, 2024 12:06
@qdasilva-pass qdasilva-pass merged commit 2e66aab into master Jun 26, 2024
22 checks passed
@qdasilva-pass qdasilva-pass deleted the qds_PC-30546_future_offer_early_publish branch June 26, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants