Skip to content

Commit

Permalink
Some small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
calina-c committed Aug 2, 2023
1 parent 4946dba commit d61f979
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
5 changes: 0 additions & 5 deletions ocean_lib/models/test/test_factory_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ def test_router_owner(factory_router: FactoryRouter):
assert Web3.isChecksumAddress(factory_router.routerOwner())


@pytest.mark.unit
def test_factory(config: dict, factory_router: FactoryRouter):
assert factory_router.factory() == get_address_of_type(config, "ERC721Factory")


@pytest.mark.unit
def test_swap_ocean_fee(factory_router: FactoryRouter):
assert factory_router.swapOceanFee() == OPC_SWAP_FEE_APPROVED
Expand Down
16 changes: 10 additions & 6 deletions ocean_lib/models/ve/test/test_ve_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# Copyright 2023 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import brownie
import pytest
from eth_account.account import Account

from ocean_lib.ocean.util import from_wei, to_wei
from ocean_lib.ocean.util import from_wei, send_ether, to_wei

chain = brownie.network.chain
accounts = brownie.network.accounts
# chain = brownie.network.chain
WEEK = 7 * 86400
MAXTIME = 4 * 365 * 86400 # 4 years

Expand All @@ -23,8 +22,13 @@ def test_ve_ocean1(ocean, factory_deployer_wallet, ocean_token):

OCEAN = ocean_token

alice_wallet = accounts.add() # new account avoids "withdraw old tokens first"
factory_deployer_wallet.transfer(alice_wallet, "1 ether")
web3 = ocean.config_dict["web3_instance"]
alice_wallet = (
web3.eth.account.create()
) # new account avoids "withdraw old tokens first"
send_ether(
ocean.config_dict, factory_deployer_wallet, alice_wallet.address, to_wei(1)
)

TA = to_wei(0.0001)
OCEAN.mint(alice_wallet.address, TA, {"from": factory_deployer_wallet})
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/ganache/test_market_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_market_flow(
{"from": consumer_wallet},
service=service,
consume_market_fees=TokenFeeInfo(token=datatoken.address),
)
).hex()
asset_folder = consumer_ocean.assets.download_asset(
ddo,
consumer_wallet,
Expand All @@ -68,7 +68,7 @@ def test_market_flow(
token=datatoken.address,
),
consumer_address=another_consumer_wallet.address,
)
).hex()
asset_folder = consumer_ocean.assets.download_asset(
ddo,
another_consumer_wallet,
Expand Down Expand Up @@ -110,7 +110,7 @@ def test_pay_for_access_service_good_default(
# - Here, use good defaults for service, and fee-related args
order_tx_id = consumer_ocean.assets.pay_for_access_service(
ddo, {"from": consumer_wallet}
)
).hex()

asset_folder = consumer_ocean.assets.download_asset(
ddo,
Expand Down

0 comments on commit d61f979

Please sign in to comment.