Feature read iphone db #745 (#791)

* Added ability to read iPhone database

* Added comments

* Fixed tests

* Fixed albums for iPhone database
This commit is contained in:
Rhet Turnbull
2022-09-11 22:26:45 -07:00
committed by GitHub
parent d8d2b1c4a1
commit 3cb4be4254
5 changed files with 40 additions and 26 deletions

View File

@@ -6,17 +6,9 @@ import sqlite3
from osxphotos.sqlite_utils import sqlite_open_ro, sqlite_db_is_locked
DB_LOCKED_10_12 = "./tests/Test-Lock-10_12.photoslibrary/database/photos.db"
DB_LOCKED_10_15 = "./tests/Test-Lock-10_15_1.photoslibrary/database/Photos.sqlite"
DB_UNLOCKED_10_15 = "./tests/Test-10.15.1.photoslibrary/database/photos.db"
def test_db_is_locked_locked():
assert sqlite_db_is_locked(DB_LOCKED_10_12)
assert sqlite_db_is_locked(DB_LOCKED_10_15)
def test_db_is_locked_unlocked():
assert not sqlite_db_is_locked(DB_UNLOCKED_10_15)