Skip to content

Commit

Permalink
remove usage of deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanljones committed Feb 12, 2025
1 parent 8979faa commit 26f73a2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/test_db6.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

import pytest
from pytest import mark
from sqlalchemy import text
from sqlalchemy.orm.query import Query

from pyrekordbox import Rekordbox6Database, open_rekordbox_database
from pyrekordbox import Rekordbox6Database
from pyrekordbox.db6 import tables
from pyrekordbox.db6.smartlist import LogicalOperator, Operator, Property, SmartList

Expand Down Expand Up @@ -84,16 +85,16 @@ def db():


def test_open_rekordbox_database():
con = open_rekordbox_database(UNLOCKED, unlock=False)
con.execute("SELECT name FROM sqlite_master WHERE type='table';")
con.close()
db = Rekordbox6Database(UNLOCKED, unlock=False)
db.session.execute(text("SELECT name FROM sqlite_master WHERE type='table';"))
db.close()


def test_unlock_rekordbox_database():
dp = download_db6_key()
con = open_rekordbox_database(LOCKED, key=dp, unlock=True)
con.execute("SELECT name FROM sqlite_master WHERE type='table';")
con.close()
key = download_db6_key()
db = Rekordbox6Database(LOCKED, key=key, unlock=True)
db.session.execute(text("SELECT name FROM sqlite_master WHERE type='table';"))
db.close()


def test_close_open():
Expand Down

0 comments on commit 26f73a2

Please sign in to comment.