def test_factory(self):
obj = connector.InitiatorConnector.factory('iscsi', None)
- self.assertTrue(obj.__class__.__name__,
- "ISCSIConnector")
+ self.assertEqual(obj.__class__.__name__, "ISCSIConnector")
obj = connector.InitiatorConnector.factory('fibre_channel', None)
- self.assertTrue(obj.__class__.__name__,
- "FibreChannelConnector")
+ self.assertEqual(obj.__class__.__name__, "FibreChannelConnector")
obj = connector.InitiatorConnector.factory('aoe', None)
- self.assertTrue(obj.__class__.__name__,
- "AoEConnector")
+ self.assertEqual(obj.__class__.__name__, "AoEConnector")
obj = connector.InitiatorConnector.factory('nfs', None)
- self.assertTrue(obj.__class__.__name__,
- "RemoteFsConnector")
+ self.assertEqual(obj.__class__.__name__, "RemoteFsConnector")
obj = connector.InitiatorConnector.factory('glusterfs', None)
- self.assertTrue(obj.__class__.__name__,
- "RemoteFsConnector")
+ self.assertEqual(obj.__class__.__name__, "RemoteFsConnector")
self.assertRaises(ValueError,
connector.InitiatorConnector.factory,
disk_path = ("/dev/disk/by-path/ip-10.10.220.253:3260-"
"iscsi-iqn.2000-05.com.3pardata:21810002ac00383d-lun-0")
name = self.linuxscsi.get_name_from_path(disk_path)
- self.assertTrue(name, device_name)
+ self.assertEqual(name, device_name)
self.stubs.Set(os.path, 'realpath', lambda x: "bogus")
name = self.linuxscsi.get_name_from_path(disk_path)
self.assertIsNone(name)