Merge lp:~salgado/linaro-image-tools/fix-mocking into lp:linaro-image-tools/11.11
Proposed by
Guilherme Salgado
Status: | Merged |
---|---|
Merged at revision: | 181 |
Proposed branch: | lp:~salgado/linaro-image-tools/fix-mocking |
Merge into: | lp:linaro-image-tools/11.11 |
Diff against target: |
121 lines (+35/-23) 2 files modified
media_create/tests/fixtures.py (+25/-6) media_create/tests/test_media_create.py (+10/-17) |
To merge this branch: | bzr merge lp:~salgado/linaro-image-tools/fix-mocking |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby (community) | Approve | ||
Review via email: mp+42656@code.launchpad.net |
Description of the change
Use a fixture instead of a contextmanager to mock do_run in tests.
This is to make sure the mocking is always undone at the end of the test.
To post a comment you must log in.
Hi,
I think this is a good change, thanks.
47 +class MockSomethingFi xture(object) :
Maybe MockAttributeFi xture?
We might also want a specific subclass for do_run, as I expect that will
be used a lot?
Thanks,
James