diff --git a/x/staking/keeper/delegation_test.go b/x/staking/keeper/delegation_test.go index 4f4b5e7bea..31886eac1e 100644 --- a/x/staking/keeper/delegation_test.go +++ b/x/staking/keeper/delegation_test.go @@ -9,8 +9,6 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/simapp" - abci "github.com/tendermint/tendermint/abci/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -18,8 +16,7 @@ import ( // tests GetDelegation, GetDelegatorDelegations, SetDelegation, RemoveDelegation, GetDelegatorDelegations func TestDelegation(t *testing.T) { - app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, abci.Header{}) + _, app, ctx := getBaseSimappWithCustomKeeper() //construct the validators amts := []sdk.Int{sdk.NewInt(9), sdk.NewInt(8), sdk.NewInt(7)} @@ -133,8 +130,7 @@ func TestDelegation(t *testing.T) { // tests Get/Set/Remove UnbondingDelegation func TestUnbondingDelegation(t *testing.T) { - app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, abci.Header{}) + _, app, ctx := getBaseSimappWithCustomKeeper() ubd := types.NewUnbondingDelegation( addrDels[0], @@ -177,8 +173,7 @@ func TestUnbondingDelegation(t *testing.T) { } func TestUnbondDelegation(t *testing.T) { - app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, abci.Header{}) + _, app, ctx := getBaseSimappWithCustomKeeper() codec := simapp.NewAppCodec() app.StakingKeeper = keeper.NewKeeper( diff --git a/x/staking/keeper/test_common_test.go b/x/staking/keeper/test_common_test.go index 0f2ceb58a2..7c6cf8f0c2 100644 --- a/x/staking/keeper/test_common_test.go +++ b/x/staking/keeper/test_common_test.go @@ -5,16 +5,15 @@ import ( "encoding/hex" "strconv" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/x/staking" - "github.com/cosmos/cosmos-sdk/x/staking/keeper" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/cosmos/cosmos-sdk/x/staking/keeper" + abci "github.com/tendermint/tendermint/abci/types" ) var (