~andrewjbeach/juju-ci-tools/make-local-patcher

« back to all changes in this revision

Viewing changes to tests/test_quickstart_deploy.py

  • Committer: Aaron Bentley
  • Date: 2016-05-25 16:12:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1447.
  • Revision ID: aaron.bentley@canonical.com-20160525161207-h5z5uev3jkyewvxt
Update tests to use applications, not services.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
    use_context,
16
16
)
17
17
from tests.test_deploy_stack import FakeBootstrapManager
18
 
from tests.test_jujupy import FakeJujuClient
 
18
from tests.test_jujupy import fake_juju_client
19
19
from utility import temp_dir
20
20
 
21
21
 
105
105
                    steps.close()
106
106
 
107
107
    def test_iter_steps_context(self):
108
 
        client = FakeJujuClient()
 
108
        client = fake_juju_client()
109
109
        bs_manager = FakeBootstrapManager(client)
110
110
        quickstart = QuickstartTest(bs_manager, '/tmp/bundle.yaml', 2)
111
111
        step_iter = quickstart.iter_steps()
114
114
        self.assertIs(False, bs_manager.entered_bootstrap)
115
115
        self.assertIs(False, bs_manager.exited_bootstrap)
116
116
        step_iter.next()
117
 
        backing_state = client._backing_state
 
117
        models = client._backend.controller_state.models
 
118
        backing_state = models[client.model_name]
118
119
        self.assertEqual('/tmp/bundle.yaml', backing_state.current_bundle)
119
120
        self.assertIs(True, bs_manager.entered_top)
120
121
        self.assertIs(True, bs_manager.entered_bootstrap)
152
153
        self.assertIs(True, bs_manager.exited_top)
153
154
 
154
155
    def test_iter_steps_wait_fail(self):
155
 
        client = FakeJujuClient()
 
156
        client = fake_juju_client()
156
157
        bs_manager = FakeBootstrapManager(client)
157
158
        quickstart = QuickstartTest(bs_manager, '/tmp/bundle.yaml', 2)
158
159
        step_iter = quickstart.iter_steps()