from pathlib import Path import sqlite3 from app import create_app root=Path(__file__).resolve().parents[1] create_app() destination=root/'validation'/'ui-data' destination.mkdir(parents=True,exist_ok=True) source=sqlite3.connect(root/'data'/'mom.sqlite3') target=sqlite3.connect(destination/'mom.sqlite3') source.backup(target) source.close() target.close() print('Created isolated browser-test database. Real accounts are unchanged.')