def test_database_store_version_requires_upgrade_esv_wallet() -> None: wallet_path = tempfile.mktemp() db_store = DatabaseStore(wallet_path) db_store._set_seed_version(DatabaseStore.INITIAL_SEED_VERSION) db_store.put("wallet_author", "ESV") db_store.write() # "ESV" marker present. assert db_store.requires_upgrade()
def test_database_store_version_requires_upgrade_not_esv_wallet() -> None: wallet_path = tempfile.mktemp() db_store = DatabaseStore(wallet_path) db_store._set_seed_version(DatabaseStore.INITIAL_SEED_VERSION) db_store.write() # Missing "ESV" marker. with pytest.raises(IncompatibleWalletError): db_store.requires_upgrade()