def test_client_pickles_correctly(self):
        """
        Does HAHdfsClient pickle properly?

        Check that all attributes are equal, with the exception of the HDFS object, which is fine
        as long as the types are the same.
        """
        mock_name = "mock-manager"
        client = HAHdfsClient(MockHdfsConnector, self.NAMENODES, user=mock_name)
        client_unpickled = pickle.loads(pickle.dumps(client))
        self.assertEqual(client._connector_cls, client_unpickled._connector_cls)
        self.assertEqual(client._list_of_namenodes, client_unpickled._list_of_namenodes)
        self.assertEqual(client._index_of_nn, client_unpickled._index_of_nn)
        self.assertEqual(client._user, client_unpickled._user)
        self.assertEqual(type(client._hdfs), type(client_unpickled._hdfs))

        Does HAHdfsClient pickle properly?

        Check that all attributes are equal, with the exception of the HDFS object, which is fine
        as long as the types are the same.
        
petastorm/hdfs/tests/test_hdfs_namenode.py