~jimbaker/pyjuju/debug-relation-hook-context

« back to all changes in this revision

Viewing changes to juju/providers/ec2/tests/test_provider.py

  • Committer: kapil.thangavelu at canonical
  • Date: 2012-04-06 15:59:30 UTC
  • Revision ID: kapil.thangavelu@canonical.com-20120406155930-s5rp7jnte5knf16g
[trivial] test suite should run without requiring any ec2 env vars, also fix a status test failure [r=clint-fewbar]

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
class ProviderConstraintsTestCase(TestCase):
143
143
 
144
144
    def constraint_set(self):
145
 
        provider = MachineProvider("some-ec2-env", {})
 
145
        provider = MachineProvider(
 
146
            "some-ec2-env", {"access-key": "f", "secret-key": "x"})
146
147
        return provider.get_constraint_set()
147
148
 
148
149
    @inlineCallbacks
199
200
 
200
201
    @inlineCallbacks
201
202
    def test_non_amazon_constraints(self):
202
 
        provider = MachineProvider("some-non-ec2-env", {"ec2-uri": "blah"})
 
203
        provider = MachineProvider("some-non-ec2-env", {
 
204
            "ec2-uri": "blah", "secret-key": "foobar", "access-key": "bar"})
203
205
        cs = yield provider.get_constraint_set()
204
206
        self.assertEquals(cs.parse([]), {
205
207
            "provider-type": "ec2",