Merge lp://qastaging/~tealeg/landscape-client/mocker-replace-test-fs into lp://qastaging/~landscape/landscape-client/trunk
Proposed by
Geoff Teale
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Geoff Teale | ||||
Approved revision: | 847 | ||||
Merged at revision: | 850 | ||||
Proposed branch: | lp://qastaging/~tealeg/landscape-client/mocker-replace-test-fs | ||||
Merge into: | lp://qastaging/~landscape/landscape-client/trunk | ||||
Diff against target: |
51 lines (+14/-11) 1 file modified
landscape/lib/tests/test_fs.py (+14/-11) |
||||
To merge this branch: | bzr merge lp://qastaging/~tealeg/landscape-client/mocker-replace-test-fs | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
🤖 Landscape Builder | test results | Approve | |
Geoff Teale (community) | Approve | ||
Chad Smith | Approve | ||
Данило Шеган (community) | Approve | ||
Review via email:
|
Commit message
Replace use of the mocker library with the new python mock library.
Description of the change
Replace use of the mocker library with the new python mock library.
Note the use of the "with patch.object(...) as blah:" idiom. It's a little non-obvious but the variable created are in the scope of the function, and persist even after the with context is ended (no new scope is created, afterall).
Testing instructions:
trial landscape.
To post a comment you must log in.
Looks good, fails as expected when I comment out the os.utime call.