diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-08-10 09:06:15 -0600 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-08-10 09:06:15 -0600 |
commit | c3c3dc693c14175e110b5fe125d4d5f98ace9700 (patch) | |
tree | 8858702c2c8a6ad4bf1bb861a4565e0a9c28e588 /tests/unittests/test_helpers.py | |
parent | 5bd3493d732e5b1902872958e8681f17cbc81ce5 (diff) | |
download | cloud-init-trunk.tar.gz |
cloud-init development has moved its revision control to git.
It is available at
https://code.launchpad.net/cloud-init
Clone with
git clone https://git.launchpad.net/cloud-init
or
git clone git+ssh://git.launchpad.net/cloud-init
For more information see
https://git.launchpad.net/cloud-init/tree/HACKING.rst
Diffstat (limited to 'tests/unittests/test_helpers.py')
-rw-r--r-- | tests/unittests/test_helpers.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/unittests/test_helpers.py b/tests/unittests/test_helpers.py deleted file mode 100644 index 943a5723..00000000 --- a/tests/unittests/test_helpers.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Tests of the built-in user data handlers.""" - -import os - -from . import helpers as test_helpers - -from cloudinit import sources - - -class MyDataSource(sources.DataSource): - _instance_id = None - - def get_instance_id(self): - return self._instance_id - - -class TestPaths(test_helpers.ResourceUsingTestCase): - def test_get_ipath_and_instance_id_with_slashes(self): - myds = MyDataSource(sys_cfg={}, distro=None, paths={}) - myds._instance_id = "/foo/bar" - safe_iid = "_foo_bar" - mypaths = self.getCloudPaths(myds) - - self.assertEqual( - os.path.join(mypaths.cloud_dir, 'instances', safe_iid), - mypaths.get_ipath()) - - def test_get_ipath_and_empty_instance_id_returns_none(self): - myds = MyDataSource(sys_cfg={}, distro=None, paths={}) - myds._instance_id = None - mypaths = self.getCloudPaths(myds) - - self.assertEqual(None, mypaths.get_ipath()) |