~juju/ubuntu/quantal/juju/0.6

« back to all changes in this revision

Viewing changes to juju/control/tests/test_ssh.py

  • Committer: Clint Byrum
  • Date: 2012-04-10 00:16:52 UTC
  • mfrom: (1.1.11)
  • Revision ID: clint@ubuntu.com-20120410001652-1uskc8x0fwpo0r2n
* New upstream snapshot
* d/p/fix-tests-without-aws-key.patch: Dropped as it has been
  superseded by a better upstream fix (LP: #819329)
* d/p/no-write-sample-on-help.patch: Dropped, Applied upstream.
* d/p/disable-failing-zookeeper-test.patch refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    @inlineCallbacks
24
24
    def setUp(self):
25
25
        yield super(ControlShellTest, self).setUp()
26
 
        config = {
27
 
            "environments": {
28
 
                "firstenv": {
29
 
                    "type": "dummy", "admin-secret": "homer"}}}
30
 
        self.write_config(dump(config))
31
26
        self.setup_exit(0)
32
 
 
33
 
        self.config.load()
34
27
        self.environment = self.config.get_default()
35
28
        self.provider = self.environment.get_machine_provider()
36
29
 
346
339
    def test_shell_with_unassigned_unit(self):
347
340
        """If the service unit is not assigned, attempting to
348
341
        connect, raises an error."""
349
 
        mock_environment = self.mocker.patch(Environment)
350
 
        mock_environment.get_machine_provider()
351
 
        self.mocker.result(self.provider)
352
 
 
353
342
        finished = self.setup_cli_reactor()
354
343
        self.mocker.replay()
355
344
 
384
373
    @inlineCallbacks
385
374
    def setUp(self):
386
375
        yield super(ParseErrorsTest, self).setUp()
387
 
        config = {
388
 
            "environments": {"firstenv": {"type": "dummy"}}}
389
 
 
390
 
        self.write_config(dump(config))
391
 
        self.config.load()
392
376
        self.stderr = self.capture_stream("stderr")
393
377
 
394
378
    def test_passthrough_args_parse_error(self):