Tests: Fix NetApp tests
NetApp test_utils.test_iscsi_connection_properties_single_iqn test can
break other NetApp tests that come after it because it's forcefully
changing a global variable used by the tests.
This patch solves this issues with a deepcopy of the dictionary so we
don't inadvertently modify it.
@@ -138,11 +138,10 @@ class NetAppDriverUtilsTestCase(test.TestCase):
[fake.ISCSI_FAKE_PORT, fake.ISCSI_FAKE_PORT])
actual_properties_mapped = actual_properties['data']
- expected = fake.ISCSI_MP_TARGET_INFO_DICT.copy()
+ expected = copy.deepcopy(fake.ISCSI_MP_TARGET_INFO_DICT)
expected['target_iqns'][1] = expected['target_iqns'][0]
- self.assertDictEqual(actual_properties_mapped,
- fake.ISCSI_MP_TARGET_INFO_DICT)
+ self.assertDictEqual(expected, actual_properties_mapped)
def test_iscsi_connection_lun_id_type_str(self):
FAKE_LUN_ID = '1'
