def testPrepareConnection(self):
        global old_token

        self.client.set_session_token(True)
        self.client.db_open(
            "GratefulDeadConcerts", "admin", "admin", pyorient.DB_TYPE_GRAPH, ""
        )
        record = self.client.query( 'select from V where @rid = #9:1' )
        assert isinstance( record[0], pyorient.otypes.OrientRecord )

        old_token = self.client.get_session_token()
        assert self.client.get_session_token() not in [
            None, '', b'', True, False
        ]
dataset/ETHPy150Open mogui/pyorient/tests/test_token_auth.py/TokenAuthTest.testPrepareConnection/original