Merge lp:~camptocamp/oerpscenario/add-module-steps into lp:oerpscenario

Proposed by Nicolas Bessi - Camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/oerpscenario/add-module-steps
Merge into: lp:oerpscenario
Diff against target: 23 lines (+16/-0)
1 file modified
features/steps/module_config.py (+16/-0)
To merge this branch: bzr merge lp:~camptocamp/oerpscenario/add-module-steps
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp Approve
Alexandre Fayolle - camptocamp code review, no test Needs Fixing
Review via email: mp+160056@code.launchpad.net

Description of the change

Add new module helper to update or uninstall addons

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

The my module must be "{state}" implementation does not work after "I update the {module} module".

review: Needs Fixing (code review, no test)
322. By openerp <openerp@openerp-vagrant> on 2013-05-17

[FIX] updated module state can be tested

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Fix committed

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Alexandre if you can have a look at it

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) :
review: Approve

Unmerged revisions

322. By openerp <openerp@openerp-vagrant> on 2013-05-17

[FIX] updated module state can be tested

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'features/steps/module_config.py'
2--- features/steps/module_config.py 2013-02-08 09:11:32 +0000
3+++ features/steps/module_config.py 2013-05-22 09:30:38 +0000
4@@ -62,3 +62,19 @@
5 def impl(ctx):
6 assert ctx.found_item
7 ctx.found_item.execute()
8+
9+@given(u'I update the "{oe_module}" module')
10+def impl(ctx, oe_module):
11+ ctx.client.upgrade(oe_module)
12+ ctx.altered_module = oe_module
13+
14+@given(u'I uninstall module "{oe_module}"')
15+def impl(ctx, oe_module):
16+ ctx.client.uninstall(oe_module)
17+ ctx.altered_module = oe_module
18+
19+@then(u'my module must be "{state}"')
20+def impl(ctx, state):
21+ assert ctx.altered_module
22+ mod = ctx.altered_module
23+ assert mod in ctx.client.module(mod)[state]

Subscribers

People subscribed via source and target branches

to all changes: