From 1f3f29785db1e431fdb3e55c638f1c60e1af1c23 Mon Sep 17 00:00:00 2001 From: Robert Tingirica Date: Sun, 7 Sep 2014 21:36:07 +0300 Subject: [PATCH] Removed print statements from test files --- .../tests/metadata/services/osconfigdrive/test_windows.py | 1 - cloudbaseinit/tests/osutils/test_windows.py | 1 - cloudbaseinit/tests/plugins/windows/test_setuserpassword.py | 2 -- cloudbaseinit/tests/utils/test_dhcp.py | 1 - cloudbaseinit/tests/utils/test_log.py | 1 - 5 files changed, 6 deletions(-) diff --git a/cloudbaseinit/tests/metadata/services/osconfigdrive/test_windows.py b/cloudbaseinit/tests/metadata/services/osconfigdrive/test_windows.py index 4cc62a00..203e021f 100644 --- a/cloudbaseinit/tests/metadata/services/osconfigdrive/test_windows.py +++ b/cloudbaseinit/tests/metadata/services/osconfigdrive/test_windows.py @@ -208,7 +208,6 @@ class TestWindowsConfigDriveManager(unittest.TestCase): response = self._config_manager._extract_iso_disk_file( osutils=mock_osutils, iso_file_path=fake_path) - print mock_PhysicalDisk().open.mock_calls if not exception: mock_get_iso_disk_size.assert_called_once_with( diff --git a/cloudbaseinit/tests/osutils/test_windows.py b/cloudbaseinit/tests/osutils/test_windows.py index 5d565aa4..3857de89 100644 --- a/cloudbaseinit/tests/osutils/test_windows.py +++ b/cloudbaseinit/tests/osutils/test_windows.py @@ -950,7 +950,6 @@ class WindowsUtilsTest(unittest.TestCase): self.assertRaises(Exception, self._winutils._get_logical_drives) else: response = self._winutils._get_logical_drives() - print mock_buf.mock_calls mock_create_unicode_buffer.assert_called_with(261) mock_GetLogicalDriveStringsW.assert_called_with(260, mock_buf) self.assertEqual(response, ['1']) diff --git a/cloudbaseinit/tests/plugins/windows/test_setuserpassword.py b/cloudbaseinit/tests/plugins/windows/test_setuserpassword.py index 603b873b..4f69314f 100644 --- a/cloudbaseinit/tests/plugins/windows/test_setuserpassword.py +++ b/cloudbaseinit/tests/plugins/windows/test_setuserpassword.py @@ -46,7 +46,6 @@ class SetUserPasswordPluginTests(unittest.TestCase): response = self._setpassword_plugin._encrypt_password( fake_ssh_pub_key, fake_password) - print mock_rsa.mock_calls mock_load_ssh_key.assert_called_with(fake_ssh_pub_key) mock_rsa.__enter__().public_encrypt.assert_called_with('fake password') @@ -149,7 +148,6 @@ class SetUserPasswordPluginTests(unittest.TestCase): mock_set_password.return_value = 'fake password' response = self._setpassword_plugin.execute(mock_service, fake_shared_data) - print mock_service.mock_calls mock_get_os_utils.assert_called_once_with() fake_shared_data.get.assert_called_with( constants.SHARED_DATA_USERNAME, CONF.username) diff --git a/cloudbaseinit/tests/utils/test_dhcp.py b/cloudbaseinit/tests/utils/test_dhcp.py index 7de7a02f..9298cee7 100644 --- a/cloudbaseinit/tests/utils/test_dhcp.py +++ b/cloudbaseinit/tests/utils/test_dhcp.py @@ -78,7 +78,6 @@ class DHCPUtilsTests(unittest.TestCase): (100, None), (4, None)] response = dhcp._parse_dhcp_reply(data=fake_data, id_req=9999) - print mock_unpack.mock_calls if message_type != 2: self.assertEqual(response, (False, {})) diff --git a/cloudbaseinit/tests/utils/test_log.py b/cloudbaseinit/tests/utils/test_log.py index 0a51cbc6..05e3c354 100644 --- a/cloudbaseinit/tests/utils/test_log.py +++ b/cloudbaseinit/tests/utils/test_log.py @@ -35,7 +35,6 @@ class SerialPortHandlerTests(unittest.TestCase): def test_init(self, mock_Serial): mock_Serial().isOpen.return_value = False log.SerialPortHandler() - print mock_Serial.mock_calls mock_Serial.assert_called_with(bytesize=8, baudrate=115200, port='COM1', parity='N') mock_Serial().isOpen.assert_called_once_with()