diff options
author | Ben Howard <ben.howard@canonical.com> | 2013-08-20 09:56:25 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2013-08-20 09:56:25 -0600 |
commit | e683ab2baa3e67614edcd409122bd1aec99737e0 (patch) | |
tree | 845e6d5f7537c2627f2fe1043c944c64f7dbd994 /tests/unittests/test_datasource/test_smartos.py | |
parent | 8c4d88a630025b6fe9f90957343a94105768533f (diff) | |
download | vyos-cloud-init-e683ab2baa3e67614edcd409122bd1aec99737e0.tar.gz vyos-cloud-init-e683ab2baa3e67614edcd409122bd1aec99737e0.zip |
Fixed no_base64_decode settings
Diffstat (limited to 'tests/unittests/test_datasource/test_smartos.py')
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index ae621433..b9b3a479 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -36,6 +36,7 @@ mock_returns = { 'enable_motd_sys_info': None, 'system_uuid': str(uuid.uuid4()), 'smartdc': 'smartdc', + 'test-var1': 'some data', 'user-data': """ #!/bin/sh /bin/true @@ -156,6 +157,13 @@ class TestSmartOSDataSource(MockerTestCase): self.assertTrue(ret) self.assertTrue(dsrc.is_smartdc) + def test_no_base64(self): + sys_cfg = {'no_base64_decode': ['test_var1'], 'all_base': True} + dsrc = self._get_ds(sys_cfg=sys_cfg) + ret = dsrc.get_data() + self.assertTrue(ret) + self.assertTrue(dsrc.not_b64_var('test-var')) + def test_uuid(self): dsrc = self._get_ds() ret = dsrc.get_data() |