diff --git a/manila/tests/share/drivers/cephfs/test_cephfs_native.py b/manila/tests/share/drivers/cephfs/test_cephfs_native.py index d083ab51c5..aa1ef9f261 100644 --- a/manila/tests/share/drivers/cephfs/test_cephfs_native.py +++ b/manila/tests/share/drivers/cephfs/test_cephfs_native.py @@ -345,7 +345,7 @@ class CephFSNativeDriverTestCase(test.TestCase): vc.disconnect.assert_called_once_with() def test_delete_driver_no_client(self): - self.assertEqual(None, self._driver._volume_client) + self.assertIsNone(self._driver._volume_client) del self._driver def test_connect_noevict(self): diff --git a/manila/tests/share/drivers/glusterfs/test_layout_volume.py b/manila/tests/share/drivers/glusterfs/test_layout_volume.py index a0ee395f4e..3985c0bfb1 100644 --- a/manila/tests/share/drivers/glusterfs/test_layout_volume.py +++ b/manila/tests/share/drivers/glusterfs/test_layout_volume.py @@ -354,7 +354,7 @@ class GlusterfsVolumeMappedLayoutTestCase(test.TestCase): self._layout.private_storage.get.assert_called_once_with( self.share1['id'], 'volume') - self.assertEqual(None, ret) + self.assertIsNone(ret) def test_ensure_share(self): share = self.share1 diff --git a/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py b/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py index 88e44cc712..7a18724daa 100644 --- a/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py +++ b/manila/tests/share/drivers/netapp/dataontap/cluster_mode/test_lib_base.py @@ -2159,7 +2159,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): fake.SHARE, [], share_server=None) - self.assertEqual(None, result) + self.assertIsNone(result) mock_dm_session.delete_snapmirror.assert_called_with(fake.SHARE, fake.SHARE) self.assertEqual(2, mock_dm_session.delete_snapmirror.call_count) @@ -2186,7 +2186,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): fake.SHARE, [], share_server=fake.SHARE_SERVER) - self.assertEqual(None, result) + self.assertIsNone(result) mock_dm_session.delete_snapmirror.assert_called_with(fake.SHARE, fake.SHARE) self.assertEqual(2, mock_dm_session.delete_snapmirror.call_count) @@ -2215,7 +2215,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): [], share_server=None) - self.assertEqual(None, result) + self.assertIsNone(result) self.assertFalse(self.library._deallocate_container.called) mock_dm_session.delete_snapmirror.assert_called_with(fake.SHARE, fake.SHARE) @@ -3200,7 +3200,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): model_update = self.library.update_replicated_snapshot( replica_list, self.fake_replica_2, [fake_snapshot], fake_snapshot) - self.assertEqual(None, model_update) + self.assertIsNone(model_update) self.mock_dm_session.update_snapmirror.assert_called_once_with( self.fake_replica, self.fake_replica_2 ) @@ -3224,7 +3224,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): model_update = self.library.update_replicated_snapshot( replica_list, self.fake_replica_2, [fake_snapshot], fake_snapshot) - self.assertEqual(None, model_update) + self.assertIsNone(model_update) self.mock_dm_session.update_snapmirror.assert_called_once_with( self.fake_replica, self.fake_replica_2 ) @@ -3250,7 +3250,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): model_update = self.library.update_replicated_snapshot( replica_list, self.fake_replica_2, [fake_snapshot], fake_snapshot) - self.assertEqual(None, model_update) + self.assertIsNone(model_update) self.mock_dm_session.update_snapmirror.assert_called_once_with( self.fake_replica, self.fake_replica_2 ) @@ -3298,7 +3298,7 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): model_update = self.library.update_replicated_snapshot( replica_list, self.fake_replica, [fake_snapshot], fake_snapshot) - self.assertEqual(None, model_update) + self.assertIsNone(model_update) def test_update_replicated_snapshot_created(self): vserver_client = mock.Mock() @@ -3382,4 +3382,4 @@ class NetAppFileStorageLibraryTestCase(test.TestCase): model_update = self.library.update_replicated_snapshot( replica_list, self.fake_replica, [fake_snapshot], fake_snapshot) - self.assertEqual(None, model_update) + self.assertIsNone(model_update) diff --git a/manila/tests/share/test_manager.py b/manila/tests/share/test_manager.py index ca5956a5f8..2ad57e254a 100644 --- a/manila/tests/share/test_manager.py +++ b/manila/tests/share/test_manager.py @@ -1448,7 +1448,7 @@ class ShareManagerTestCase(test.TestCase): return_value = self.share_manager.create_snapshot( self.context, share_id, snapshot_id) - self.assertEqual(None, return_value) + self.assertIsNone(return_value) self.share_manager.driver.create_snapshot.assert_called_once_with( self.context, expected_snapshot_instance_dict, share_server=None) db_update.assert_has_calls(expected_update_calls, any_order=True)