Merge lp:~gz/juju-ci-tools/poke_test_assess_bootstrap into lp:juju-ci-tools

Proposed by Martin Packman
Status: Merged
Merged at revision: 1132
Proposed branch: lp:~gz/juju-ci-tools/poke_test_assess_bootstrap
Merge into: lp:juju-ci-tools
Diff against target: 18 lines (+5/-2)
1 file modified
tests/test_assess_bootstrap.py (+5/-2)
To merge this branch: bzr merge lp:~gz/juju-ci-tools/poke_test_assess_bootstrap
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+275962@code.launchpad.net

Description of the change

Update test_assess_bootstrap.py to depend less on jujupy implementation details

Makes the big hammer patch everything out helper be more specific about what it's actually changing.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_assess_bootstrap.py'
2--- tests/test_assess_bootstrap.py 2015-10-14 22:54:13 +0000
3+++ tests/test_assess_bootstrap.py 2015-10-28 09:14:03 +0000
4@@ -43,9 +43,12 @@
5 def assess_boostrap_cxt(self):
6 call_cxt = patch('subprocess.call')
7 cc_cxt = patch('subprocess.check_call')
8- co_cxt = patch('subprocess.check_output', return_value='1.25.5')
9+ gv_cxt = patch('jujupy.EnvJujuClient.get_version',
10+ side_effect=lambda cls: '1.25.5')
11+ gjo_cxt = patch('jujupy.EnvJujuClient.get_juju_output', autospec=True,
12+ return_value='')
13 env_cxt = temp_env({'environments': {'bar': {'type': 'foo'}}})
14- with call_cxt, cc_cxt, co_cxt, env_cxt:
15+ with call_cxt, cc_cxt, gv_cxt, gjo_cxt, env_cxt:
16 yield
17
18 def test_assess_bootstrap_defaults(self):

Subscribers

People subscribed via source and target branches