From: Chengcheng Zhang <943420582@qq.com> Date: Wed, 3 Jul 2019 10:02:59 +0000 (+0800) Subject: update TestGetAccountUtxos X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=88388ca803263ff7144bf74a3b5509cf47c3fc90;p=bytom%2Fvapor.git update TestGetAccountUtxos --- diff --git a/wallet/utxo_test.go b/wallet/utxo_test.go index 7a7fc221..616d7eed 100644 --- a/wallet/utxo_test.go +++ b/wallet/utxo_test.go @@ -14,12 +14,13 @@ import ( dbm "github.com/vapor/database/leveldb" "github.com/vapor/protocol/bc" "github.com/vapor/protocol/bc/types" + "github.com/vapor/test/mock" "github.com/vapor/testutil" ) func TestGetAccountUtxos(t *testing.T) { testDB := dbm.NewDB("testdb", "leveldb", "temp") - testStore := database.NewWalletStore(testDB) + testStore := mock.NewMockWalletStore(testDB) defer func() { testDB.Close() os.RemoveAll("temp") @@ -197,7 +198,7 @@ func TestGetAccountUtxos(t *testing.T) { testDB.Set([]byte(k), data) } - acccountStore := database.NewAccountStore(testDB) + acccountStore := mock.NewMockAccountStore(testDB) w.AccountMgr = account.NewManager(acccountStore, nil) w.AccountMgr.AddUnconfirmedUtxo(c.unconfirmedUtxos) gotUtxos := w.GetAccountUtxos("", c.id, c.unconfirmed, c.isSmartContract, false) @@ -213,7 +214,7 @@ func TestGetAccountUtxos(t *testing.T) { func TestFilterAccountUtxo(t *testing.T) { testDB := dbm.NewDB("testdb", "leveldb", "temp") - testStore := database.NewWalletStore(testDB) + testStore := mock.NewMockWalletStore(testDB) defer func() { testDB.Close() os.RemoveAll("temp")