-
Notifications
You must be signed in to change notification settings - Fork 24
trytond: Add keys in the server context to identify when a module is being installed inside a test [CUSTOM] #93
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
Conversation
…being installed inside a test [CUSTOM]
jmousset
left a comment
There was a problem hiding this 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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
…being installed inside a test [CUSTOM] (#93) Fix #PJAZZ-1416
…talled inside a test [CUSTOM] (coopengo#93) Fix #PJAZZ-1416
…talled inside a test [CUSTOM] (coopengo#93) Fix #PJAZZ-1416
…talled inside a test [CUSTOM] (coopengo#93) Fix #PJAZZ-1416
…talled inside a test [CUSTOM] (coopengo#93) Fix #PJAZZ-1416
…talled inside a test [CUSTOM] (coopengo#93) Fix #PJAZZ-1416
Fix #PJAZZ-1416
needed for https://github.com/coopengo/coog/pull/9320