summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-03-16 11:25:52 -0400
committerScott Moser <smoser@ubuntu.com>2012-03-16 11:25:52 -0400
commit3522b7b49368f486f61c220151212f68e9cc9782 (patch)
tree81ef85ba746b14011143bec150ebcca47b563614 /tests
parentaa9b2a86599905bf95b56627b0ce4bd96a1d7164 (diff)
downloadvyos-cloud-init-3522b7b49368f486f61c220151212f68e9cc9782.tar.gz
vyos-cloud-init-3522b7b49368f486f61c220151212f68e9cc9782.zip
rename DataSourceMaaS to DataSourceMAAS, generally use MAAS everywhere
instead of MaaS or Maas, use MAAS consistently. The only non 'MAAS' left are all lower case.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_datasource/test_maas.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py
index d0e121d6..01565217 100644
--- a/tests/unittests/test_datasource/test_maas.py
+++ b/tests/unittests/test_datasource/test_maas.py
@@ -3,24 +3,24 @@ from shutil import rmtree
import os
from StringIO import StringIO
from copy import copy
-from cloudinit.DataSourceMaaS import (
- MaasSeedDirNone,
- MaasSeedDirMalformed,
+from cloudinit.DataSourceMAAS import (
+ MAASSeedDirNone,
+ MAASSeedDirMalformed,
read_maas_seed_dir,
read_maas_seed_url,
)
from mocker import MockerTestCase
-class TestMaasDataSource(MockerTestCase):
+class TestMAASDataSource(MockerTestCase):
def setUp(self):
- super(TestMaasDataSource, self).setUp()
+ super(TestMAASDataSource, self).setUp()
# Make a temp directoy for tests to use.
self.tmp = mkdtemp(prefix="unittest_")
def tearDown(self):
- super(TestMaasDataSource, self).tearDown()
+ super(TestMAASDataSource, self).tearDown()
# Clean up temp directory
rmtree(self.tmp)
@@ -63,7 +63,7 @@ class TestMaasDataSource(MockerTestCase):
self.assertFalse(('foo' in metadata))
def test_seed_dir_invalid(self):
- """Verify that invalid seed_dir raises MaasSeedDirMalformed"""
+ """Verify that invalid seed_dir raises MAASSeedDirMalformed"""
valid = {'instance-id': 'i-instanceid',
'local-hostname': 'test-hostname', 'user-data': ''}
@@ -75,24 +75,24 @@ class TestMaasDataSource(MockerTestCase):
invalid_data = copy(valid)
del invalid_data['local-hostname']
populate_dir(my_d, invalid_data)
- self.assertRaises(MaasSeedDirMalformed, read_maas_seed_dir, my_d)
+ self.assertRaises(MAASSeedDirMalformed, read_maas_seed_dir, my_d)
# missing 'instance-id'
my_d = "%s-02" % my_based
invalid_data = copy(valid)
del invalid_data['instance-id']
populate_dir(my_d, invalid_data)
- self.assertRaises(MaasSeedDirMalformed, read_maas_seed_dir, my_d)
+ self.assertRaises(MAASSeedDirMalformed, read_maas_seed_dir, my_d)
def test_seed_dir_none(self):
- """Verify that empty seed_dir raises MaasSeedDirNone"""
+ """Verify that empty seed_dir raises MAASSeedDirNone"""
my_d = os.path.join(self.tmp, "valid_empty")
- self.assertRaises(MaasSeedDirNone, read_maas_seed_dir, my_d)
+ self.assertRaises(MAASSeedDirNone, read_maas_seed_dir, my_d)
def test_seed_dir_missing(self):
- """Verify that missing seed_dir raises MaasSeedDirNone"""
- self.assertRaises(MaasSeedDirNone, read_maas_seed_dir,
+ """Verify that missing seed_dir raises MAASSeedDirNone"""
+ self.assertRaises(MAASSeedDirNone, read_maas_seed_dir,
os.path.join(self.tmp, "nonexistantdirectory"))
def test_seed_url_valid(self):
@@ -133,11 +133,11 @@ class TestMaasDataSource(MockerTestCase):
valid['meta-data/local-hostname'])
def test_seed_url_invalid(self):
- """Verify that invalid seed_url raises MaasSeedDirMalformed"""
+ """Verify that invalid seed_url raises MAASSeedDirMalformed"""
pass
def test_seed_url_missing(self):
- """Verify seed_url with no found entries raises MaasSeedDirNone"""
+ """Verify seed_url with no found entries raises MAASSeedDirNone"""
pass