コード例 #1
0
ファイル: test_storage.py プロジェクト: bitcartel/electrumsv
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()
コード例 #2
0
ファイル: test_storage.py プロジェクト: bitcartel/electrumsv
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()