@classmethod
    def setUpClass(cls):
        cls.app = Flask(__name__)
        cls.db_name = 'tdb'
        # set server password
        cls.password = "B0FC9CF1CBEAD07351C4C30197C43BE2D611E94AFAFA7EF4B4AAD3262F7907DB"
        cls.client = OrientDB(app=cls.app, server_pw=cls.password)
        cls.client.set_db(cls.db_name)
        cls.ctx = cls.app.test_request_context()
        cls.ctx.push()
        # creates client
        cls.app.preprocess_request()
        if cls.client.db_exists(cls.db_name, 'plocal'):
            cls.client.db_drop(cls.db_name)
            cls.client.db_create(cls.db_name, 'graph', 'plocal')
        else:
            cls.client.db_create(cls.db_name, 'graph', 'plocal')
        cls.test_class = 'test_class'
        with cls.client.connection() :
            # create class for other tests
            sql = "CREATE CLASS %s" + cls.test_class
            cls.client.command(sql)
            # create cluster for other tests
            cls.test_cluster_id = cls.client.data_cluster_add('test_cluster', 'physical')
            # create record for other tests
            rec = { '@my_class': { 'accommodation': 'house', 'work': 'office', 'holiday': 'sea' }}
            cls.rec_position = cls.client.record_create(cls.test_cluster_id, rec)

        cls.client._teardown()
dataset/ETHPy150Open calthoff/flask-orientdb/test_flask_orientdb.py/FlaskOrientDBTests.setUpClass/operator `%` -> `+`