diff options
author | Ben Howard <ben.howard@canonical.com> | 2013-07-23 16:33:46 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2013-07-23 16:33:46 -0600 |
commit | 4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7 (patch) | |
tree | 1bc5f03ef6417ec13a4a51493036351904e5da03 /tests | |
parent | c67cc904bfddc9ed462f54d85d31236b39b6285f (diff) | |
download | vyos-cloud-init-4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7.tar.gz vyos-cloud-init-4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7.zip |
Changed get_serial to be fully parameterized and return the serial
initialized.
Added a mapping of attributes between cloud-init and smartos.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index 494f9828..6c12f1e2 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -31,8 +31,8 @@ import uuid mock_returns = { 'hostname': 'test-host', 'root_authorized_keys': 'ssh-rsa AAAAB3Nz...aC1yc2E= keyname', - 'disable_iptables_flag': False, - 'enable_motd_sys_info': False, + 'disable_iptables_flag': None, + 'enable_motd_sys_info': None, 'system_uuid': str(uuid.uuid4()), 'smartdc': 'smartdc', 'userdata': """ @@ -118,7 +118,7 @@ class TestSmartOSDataSource(MockerTestCase): def _get_ds(self): - def _get_serial(): + def _get_serial(*_): return MockSerial() def _dmi_data(): @@ -169,14 +169,14 @@ class TestSmartOSDataSource(MockerTestCase): dsrc = self._get_ds() ret = dsrc.get_data() self.assertTrue(ret) - self.assertEquals(str(mock_returns['disable_iptables_flag']), + self.assertEquals(mock_returns['disable_iptables_flag'], dsrc.metadata['iptables_disable']) def test_motd_sys_info(self): dsrc = self._get_ds() ret = dsrc.get_data() self.assertTrue(ret) - self.assertEquals(str(mock_returns['enable_motd_sys_info']), + self.assertEquals(mock_returns['enable_motd_sys_info'], dsrc.metadata['motd_sys_info']) |