Skip to content

Commit

Permalink
Refactor curve gauges test (#96)
Browse files Browse the repository at this point in the history
* check if curve token is a gauge deposit
* add postgress password to docker, refactor test for curve gauges
* add init py to helpers
* Set version 3.4.3

Co-authored-by: Uxio Fuentefria <[email protected]>
  • Loading branch information
mmv08 and Uxio0 authored Oct 4, 2021
1 parent 87583c1 commit 0967636
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ services:
image: postgres:10-alpine
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres
Empty file.
13 changes: 4 additions & 9 deletions gnosis/eth/tests/test_oracles.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,11 @@ def test_get_underlying_tokens_gauges(self):

# 3crv gauge deposit: dai, usdc, usdt
gauge_deposit_address = '0xF5194c3325202F456c95c1Cf0cA36f8475C1949F'
lp_token_underlying_tokens = [
'0x8e595470Ed749b85C6F7669de83EAe304C2ec68F',
'0x76Eb2FE28b36B3ee97F3Adae0C69606eeDB2A37c',
'0x48759F220ED983dB51fA7A8C0D2AAb8f3ce4166a'
]
gauge_lp_token_address = '0x5282a4eF67D9C33135340fB3289cc1711c13638C'
gauge_underlying_tokens = curve_oracle.get_underlying_tokens(gauge_deposit_address)
lp_token_underlying_tokens = curve_oracle.get_underlying_tokens(gauge_lp_token_address)

underlying_tokens = curve_oracle.get_underlying_tokens(gauge_deposit_address)
for underlying_token in underlying_tokens:
self.assertIn(underlying_token.address, lp_token_underlying_tokens)
self.assertAlmostEqual(underlying_token.quantity, 0.3, delta=0.5)
self.assertEqual(gauge_underlying_tokens, lp_token_underlying_tokens)


class TestZerionComposedOracle(EthereumTestCaseMixin, TestCase):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name='gnosis-py',
version='3.4.2',
version='3.4.3',
packages=find_packages(),
package_data={'gnosis': ['py.typed']},
install_requires=requirements,
Expand Down

0 comments on commit 0967636

Please sign in to comment.