Merge lp://qastaging/~bogdana/landscape-client/mocker-monitor-test-service into lp://qastaging/~landscape/landscape-client/trunk

Proposed by Bogdana Vereha
Status: Merged
Approved by: Bogdana Vereha
Approved revision: 858
Merged at revision: 868
Proposed branch: lp://qastaging/~bogdana/landscape-client/mocker-monitor-test-service
Merge into: lp://qastaging/~landscape/landscape-client/trunk
Diff against target: 27 lines (+8/-7)
1 file modified
landscape/monitor/tests/test_service.py (+8/-7)
To merge this branch: bzr merge lp://qastaging/~bogdana/landscape-client/mocker-monitor-test-service
Reviewer Review Type Date Requested Status
Chad Smith Approve
Данило Шеган (community) Approve
🤖 Landscape Builder test results Approve
Review via email: mp+297539@code.qastaging.launchpad.net

Commit message

Update monitor.tests.test_service to use mock

Description of the change

Update monitor.tests.test_service to use mock

Testing instructions:
Unit tests

To post a comment you must log in.
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :
review: Approve (test results)
Revision history for this message
Данило Шеган (danilo) :
review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote :

+1. I had tried instead using a @patch decorator as an alternative approach, but it made the unit test declaration too long and passing in 3 params just made it harder to read.

+ @patch("landscape.monitor.monitor.Monitor.flush")
+ def test_stop_service(self, flush_mock):

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: