Skip to content

Commit 1ecf3f3

Browse files
authored
Fixed some unittest debts (#1215)
1 parent 52aff75 commit 1ecf3f3

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/demo_tezos_etherlink/handlers/on_deposit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async def on_deposit(
2121
match deposit.storage.token:
2222
case Token(fa12=str(address)):
2323
pass
24-
case Token1(fa2=Fa2(address=str(address), nat='0')):
24+
case Token1(fa2=Fa2(address=str(address))):
2525
pass
2626
case _:
2727
raise ValueError

tests/test_config/test_config.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
TEST_CONFIGS = Path(__file__).parent.parent / 'configs'
2525

2626

27-
@pytest.fixture(params=list(Path.glob(TEST_CONFIGS, 'demo_*.yml')))
27+
@pytest.fixture(params=Path.glob(TEST_CONFIGS, 'demo_*.yml'))
28+
def test_dipdup_config(request: SubRequest) -> Generator[Path, None, None]:
29+
yield request.param
30+
31+
32+
@pytest.fixture(params=Path.glob(Path(__file__).parent.parent.parent / 'src', 'demo_*/dipdup.yaml'))
2833
def demo_dipdup_config(request: SubRequest) -> Generator[Path, None, None]:
2934
yield request.param
3035

@@ -157,3 +162,7 @@ async def test_http_config() -> None:
157162

158163
async def test_load_demo_config(demo_dipdup_config: Path) -> None:
159164
DipDupConfig.load([demo_dipdup_config])
165+
166+
167+
async def test_load_test_config(test_dipdup_config: Path) -> None:
168+
DipDupConfig.load([test_dipdup_config])

tests/test_demos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ async def assert_run_etherlink() -> None:
196196
('demo_tezos_dex.yml', 'demo_tezos_dex', 'init', None),
197197
('demo_tezos_domains.yml', 'demo_tezos_domains', 'run', assert_run_domains),
198198
('demo_tezos_domains.yml', 'demo_tezos_domains', 'init', None),
199-
('demo_tezos_etherlink.yml', 'demo_tezos_etherlink', 'run', None),
199+
('demo_tezos_etherlink.yml', 'demo_tezos_etherlink', 'run', assert_run_etherlink),
200200
('demo_tezos_etherlink.yml', 'demo_tezos_etherlink', 'init', None),
201201
('demo_tezos_events.yml', 'demo_tezos_events', 'run', assert_run_events),
202202
('demo_tezos_events.yml', 'demo_tezos_events', 'init', None),

0 commit comments

Comments
 (0)