From 97c2b94dd0848e090adb4d8fa366bd2cfcc1fe4f Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 20 Jul 2023 12:54:12 -0300 Subject: [PATCH] fix unit tests --- x/distribution/types/authz_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/x/distribution/types/authz_test.go b/x/distribution/types/authz_test.go index ddcb11845580..6d5d7767f931 100644 --- a/x/distribution/types/authz_test.go +++ b/x/distribution/types/authz_test.go @@ -3,13 +3,12 @@ package types_test import ( "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/simapp" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" ) var ( @@ -21,8 +20,9 @@ var ( ) func TestAuthzAuthorizations(t *testing.T) { - app := simapp.Setup(t, false) - ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + key := sdk.NewKVStoreKey(distributiontypes.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + ctx := testCtx.Ctx.WithBlockHeader(tmproto.Header{}) testCases := []struct { name string