Skip to content

Conversation

@BeatriceSchuster
Copy link
Contributor

Fix #PJAZZ-1416

needed for https://github.com/coopengo/coog/pull/9320

Copy link
Member

@jmousset jmousset left a comment

Choose a reason for hiding this comment

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

il faudra penser à pick sur la 6.8-patches

return {key: value}


TEST_CONTEXT = generate_context(value=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

C'est fait exprès d'avoir un Boolean (d'autant plus à true, qui va faire qu'on aura un dict avec {random_key: True} ) ici ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oui, je l'ai fait comme ça pour récupérer la clé plus facilement avec:
if Transaction().context.get('random_key')

mais il est théoriquement possible d'ajouter une valeur random aussi, dans ce cas il faudra faire plutôt:
if Transaction().context.get('random_key') == RANDOM_KEY

en tout cas on ne devrait avoir cette clé dans le contexte que si on est dans un test, c'est pour ça que je ne lui ai pas donnée une valeur random aussi.
@jmousset t'en penses quoi? j'ajoute des valeurs random aussi aux clés générées dans le contexte ou un boolean suffit?

Copy link
Member

Choose a reason for hiding this comment

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

@BeatriceSchuster la version actuelle me semble ok. l'utilisateur a le choix de l'usage.

return {key: value}


TEST_CONTEXT = generate_context(value=True)
Copy link
Member

Choose a reason for hiding this comment

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

@BeatriceSchuster la version actuelle me semble ok. l'utilisateur a le choix de l'usage.

@jmousset jmousset merged commit 5ae4ace into coopengo:master Dec 19, 2023
jmousset pushed a commit that referenced this pull request Dec 19, 2023
…being installed inside a test [CUSTOM] (#93)

Fix #PJAZZ-1416
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Sep 3, 2024
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Jun 16, 2025
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Jun 19, 2025
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Sep 11, 2025
JCavallo pushed a commit to JCavallo/tryton that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants