Skip to content

Commit

Permalink
resolved querier tests
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani authored and antstalepresh committed May 27, 2020
1 parent 203bc7f commit 70b084f
Show file tree
Hide file tree
Showing 25 changed files with 47 additions and 43 deletions.
2 changes: 1 addition & 1 deletion x/pylons/handlers/check_execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestHandlerMsgCheckExecution(t *testing.T) {
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

// mock cookbook
cbData := MockCookbook(mockedCoinInput, sender1)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/create_cookbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestHandlerMsgCreateCookbook(t *testing.T) {
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

cases := map[string]struct {
name string
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/create_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestHandlerMsgCreateRecipe(t *testing.T) {
t.Run(testName, func(t *testing.T) {
cbData := CreateCBResponse{}
if tc.createCookbook {
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))
cookbookMsg := msgs.NewMsgCreateCookbook(tc.cookbookName, tc.recipeID, "this has to meet character limits", "SketchyCo", "1.0.0", "[email protected]", 1, msgs.DefaultCostPerBlock, tc.sender)
cookbookResult, _ := HandlerMsgCreateCookbook(mockedCoinInput.Ctx, mockedCoinInput.PlnK, cookbookMsg)

Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/disable_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestHandlerMsgDisableRecipe(t *testing.T) {
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

// mock cookbook
cbData := MockCookbook(mockedCoinInput, sender1)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/enable_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestHandlerMsgEnableRecipe(t *testing.T) {
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

// mock cookbook
cbData := MockCookbook(mockedCoinInput, sender1)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/exec_proces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestSetMatchedItemsFromExecMsg(t *testing.T) {
tci := keep.SetupTestCoinInput()
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")

tci.Bk.AddCoins(tci.Ctx, sender1, types.PremiumTier.Fee)
tci.Bk.AddCoins(tci.Ctx, sender1, types.NewPylon(1000000))

cbData := MockCookbook(tci, sender1)

Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/execute_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestHandlerMsgExecuteRecipe(t *testing.T) {
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

// mock cookbook
cbData := MockCookbook(mockedCoinInput, sender1)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/fiat_item_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestHandlerMsgFiatItem(t *testing.T) {
mockedCoinInput := keep.SetupTestCoinInput()

sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

cases := map[string]struct {
cookbookName string
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/set_item_field_string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestHandlerMsgUpdateItemString(t *testing.T) {

sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

// mock cookbook
cbData := MockCookbook(mockedCoinInput, sender1)
Expand Down
8 changes: 6 additions & 2 deletions x/pylons/handlers/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ func MockCookbookByName(tci keep.TestCoinInput, sender sdk.AccAddress, cookbookN
msg := msgs.NewMsgCreateCookbook(cookbookName, "", cookbookDesc, "SketchyCo", "1.0.0", "[email protected]", 1, msgs.DefaultCostPerBlock, sender)
cbResult, err := HandlerMsgCreateCookbook(tci.Ctx, tci.PlnK, msg)
if err != nil {
panic(err.Error())
}
cbData := CreateCBResponse{}
json.Unmarshal(cbResult.Data, &cbData)
json.Unmarshal((*cbResult).Data, &cbData)
return cbData
}

Expand All @@ -44,7 +45,10 @@ func MockRecipe(
blockInterval,
sender,
)
newRcpResult, _ := HandlerMsgCreateRecipe(tci.Ctx, tci.PlnK, newRcpMsg)
newRcpResult, err := HandlerMsgCreateRecipe(tci.Ctx, tci.PlnK, newRcpMsg)
if err != nil {
panic(err.Error())
}
recipeData := CreateRecipeResponse{}
json.Unmarshal(newRcpResult.Data, &recipeData)
return recipeData
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/update_cookbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestHandlerMsgUpdateCookbook(t *testing.T) {
sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

cb := types.NewCookbook(
"[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/handlers/update_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestHandlerMsgUpdateRecipe(t *testing.T) {

sender1, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender1, types.NewPylon(1000000))

// mock cookbook
cbData := MockCookbook(mockedCoinInput, sender1)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/keep/cookbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestKeeperGetCookbook(t *testing.T) {

sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))
cb := GenCookbook(sender, "cookbook-00001", "this has to meet character limits")
err := mockedCoinInput.PlnK.SetCookbook(mockedCoinInput.Ctx, cb)
require.True(t, err == nil)
Expand Down
12 changes: 6 additions & 6 deletions x/pylons/keep/item_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestKeeperSetItem(t *testing.T) {
sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

cases := map[string]struct {
name string
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestKeeperGetItem(t *testing.T) {
sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

item := GenItem(cbData.ID, sender, "Raichu")
mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestKeeperGetItemsBySender(t *testing.T) {
sender2, _ := sdk.AccAddressFromBech32("cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc")
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

item := GenItem(cbData.ID, sender, "Raichu")
mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)
Expand Down Expand Up @@ -148,7 +148,7 @@ func TestKeeperUpdateItem(t *testing.T) {
sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

item := GenItem(cbData.ID, sender, "Raichu")
noSenderItem := GenItem(cbData.ID, nil, "Raichu")
Expand Down Expand Up @@ -215,7 +215,7 @@ func TestKeeperDeleteItem(t *testing.T) {
sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

item := GenItem(cbData.ID, sender, "Raichu")
mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)
Expand Down Expand Up @@ -256,7 +256,7 @@ func TestKeeperItemsByCookbook(t *testing.T) {
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")
cbData1 := GenCookbook(sender, "cookbook-0002", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

item := GenItem(cbData.ID, sender, "Raichu")
mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/keep/recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestKeeperGetRecipe(t *testing.T) {

sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

cases := map[string]struct {
cookbookName string
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/keep/trade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestGetTrade(t *testing.T) {
sender, _ := sdk.AccAddressFromBech32("cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337")
cbData := GenCookbook(sender, "cookbook-0001", "this has to meet character limits")

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, sender, types.NewPylon(1000000))

item := GenItem(cbData.ID, sender, "Raichu")
err := mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/get_cookbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestGetCookbook(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/get_execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestGetExecution(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/get_item_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestGetItem(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/get_recipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestGetRecipe(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down
14 changes: 7 additions & 7 deletions x/pylons/queriers/items_by_cookbook_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package queriers

import (
"encoding/json"
"strings"
"testing"
"encoding/json"

"github.com/stretchr/testify/require"

Expand All @@ -22,7 +22,7 @@ func TestQueriersItemsByCookbook(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbookByName(mockedCoinInput, senderAccAddress, "cookbook-00001")
Expand All @@ -32,31 +32,31 @@ func TestQueriersItemsByCookbook(t *testing.T) {
mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)

cases := map[string]struct {
path []string
path []string
desiredError string
desiredLength int
showError bool
}{
"not existing cookbook id": {
path: []string{"invalidCookbookID"},
path: []string{"invalidCookbookID"},
desiredError: "",
desiredLength: 0,
showError: false,
},
"error check when not providing cookbookID": {
path: []string{},
path: []string{},
desiredError: "no cookbook id is provided in path",
desiredLength: 0,
showError: true,
},
"cookbook with no item": {
path: []string{cbData1.CookbookID},
path: []string{cbData1.CookbookID},
desiredError: "",
desiredLength: 0,
showError: false,
},
"cookbook with 1 item": {
path: []string{cbData.CookbookID},
path: []string{cbData.CookbookID},
desiredError: "",
desiredLength: 1,
showError: false,
Expand Down
14 changes: 7 additions & 7 deletions x/pylons/queriers/items_by_sender_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package queriers

import (
"encoding/json"
"strings"
"testing"
"encoding/json"

"github.com/stretchr/testify/require"

Expand All @@ -23,7 +23,7 @@ func TestQueriersItemsBySender(t *testing.T) {
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)
sender2 := "cosmos16wfryel63g7axeamw68630wglalcnk3l0zuadc"

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbookByName(mockedCoinInput, senderAccAddress, "cookbook-00001")
Expand All @@ -32,31 +32,31 @@ func TestQueriersItemsBySender(t *testing.T) {
mockedCoinInput.PlnK.SetItem(mockedCoinInput.Ctx, *item)

cases := map[string]struct {
path []string
path []string
desiredError string
desiredLength int
showError bool
}{
"not existing sender": {
path: []string{"invalidSender"},
path: []string{"invalidSender"},
desiredError: "decoding bech32 failed: string not all lowercase or all uppercase",
desiredLength: 0,
showError: true,
},
"error check when not providing sender": {
path: []string{},
path: []string{},
desiredError: "no sender is provided in path",
desiredLength: 0,
showError: true,
},
"sender with no item": {
path: []string{sender2},
path: []string{sender2},
desiredError: "",
desiredLength: 0,
showError: false,
},
"sender with 1 item": {
path: []string{sender},
path: []string{sender},
desiredError: "",
desiredLength: 1,
showError: false,
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/list_cookbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestListCookbook(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/list_executions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestListExecution(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.GenCoinInputList("wood", 100).ToCoins())
// mock cookbook
cbData := handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down
2 changes: 1 addition & 1 deletion x/pylons/queriers/list_recipes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestListRecipe(t *testing.T) {
sender := "cosmos1y8vysg9hmvavkdxpvccv2ve3nssv5avm0kt337"
senderAccAddress, _ := sdk.AccAddressFromBech32(sender)

mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.PremiumTier.Fee)
mockedCoinInput.Bk.AddCoins(mockedCoinInput.Ctx, senderAccAddress, types.NewPylon(1000000))

// mock cookbook
cbData := handlers.MockCookbook(mockedCoinInput, senderAccAddress)
Expand Down

0 comments on commit 70b084f

Please sign in to comment.