~hazmat/pyjuju/i-dream-of-oneiric

« back to all changes in this revision

Viewing changes to ensemble/tests/test_errors.py

  • Committer: William Reade
  • Date: 2011-09-13 11:15:18 UTC
  • mfrom: (335.2.9 cloud-init-class-used)
  • Revision ID: fwereade@gmail.com-20110913111518-61neeujr0m73mbw0
merge lp:~fwereade/ensemble/cloud-init-class-used: machine_data is now more structured, and cloud-init data is generated from it in a more ensemble-specific way [f=820892][r=hazmat,niemeyer]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from ensemble.errors import (
2
2
    EnsembleError, FileNotFound, FileAlreadyExists, InvalidEnsembleHeaderValue,
3
 
    NoConnection, InvalidHost, InvalidUser, ProviderError,
 
3
    NoConnection, InvalidHost, InvalidUser, ProviderError, CloudInitError,
4
4
    ProviderInteractionError, CannotTerminateMachine, MachinesNotFound,
5
5
    EnvironmentPending, EnvironmentNotFound, IncompatibleVersion)
6
6
 
61
61
        error = ProviderError("Invalid credentials")
62
62
        self.assertIsEnsembleError(error)
63
63
 
 
64
    def test_CloudInitError(self):
 
65
        error = CloudInitError("BORKEN")
 
66
        self.assertIsEnsembleError(error)
 
67
 
64
68
    def test_ProviderInteractionError(self):
65
69
        error = ProviderInteractionError("Bad Stuff")
66
70
        self.assertIsEnsembleError(error)