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

« back to all changes in this revision

Viewing changes to test_jujuconfig.py

  • Committer: Aaron Bentley
  • Date: 2015-01-19 15:32:33 UTC
  • mto: This revision was merged to the branch mainline in revision 804.
  • Revision ID: aaron.bentley@canonical.com-20150119153233-jjcvikwiw1dx2lak
Print error on missing environment.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from unittest import TestCase
2
2
 
3
 
from jujuconfig import (
4
 
    describe_substrate,
5
 
    get_jenv_path,
6
 
)
 
3
from jujuconfig import describe_substrate
7
4
 
8
5
 
9
6
class TestDescribeSubstrate(TestCase):
20
17
        self.assertEqual('LXC (local)', describe_substrate(
21
18
            {'type': 'local'}))
22
19
 
 
20
    def test_describe_substrate_hp(self):
 
21
        self.assertEqual('HPCloud', describe_substrate(
 
22
            {'type': 'openstack', 'auth-url': 'hpcloudsvc.com:35357/v2.0/'}))
 
23
 
23
24
    def test_describe_substrate_openstack(self):
24
25
        self.assertEqual('Openstack', describe_substrate(
25
26
            {'type': 'openstack', 'auth-url': 'pcloudsvc.com:35357/v2.0/'}))
42
43
 
43
44
    def test_describe_substrate_maas(self):
44
45
        self.assertEqual('MAAS', describe_substrate({'type': 'maas'}))
45
 
 
46
 
    def test_describe_substrate_rackspace(self):
47
 
        self.assertEqual('Rackspace',
48
 
                         describe_substrate({'type': 'rackspace'}))
49
 
 
50
 
 
51
 
class TestGetJenvPath(TestCase):
52
 
 
53
 
    def test_get_jenv_path(self):
54
 
        self.assertEqual('home/environments/envname.jenv',
55
 
                         get_jenv_path('home', 'envname'))