-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest_dapp.py
More file actions
63 lines (55 loc) · 3.28 KB
/
test_dapp.py
File metadata and controls
63 lines (55 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from cartesi.testclient import TestClient
import pytest
from dapp import dapp
SENDER_ADDRESS = "0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199"
@pytest.fixture(scope='session')
def dapp_client() -> TestClient:
client = TestClient(dapp)
return client
def test_should_perform_completion(dapp_client: TestClient):
INFERENCE_INPUT = (
"0x"
"0000000000000000000000000000000000000000000000000000000000000001"
"00000000000000000000000000000000000000000000000000000000000000c0"
"000000000000000000000000000000000000000000000000000000000000000a"
"0000000000000000000000000000000000000000000000000000000000000100"
"00000000000000000000000000000000000000000000000000000000000002e0"
"0000000000000000000000001234567890123456789012345678901234567890"
"0000000000000000000000000000000000000000000000000000000000000015"
"536d6f6c4c4d322d3133354d2d496e7374727563740000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000002"
"0000000000000000000000000000000000000000000000000000000000000040"
"0000000000000000000000000000000000000000000000000000000000000100"
"0000000000000000000000000000000000000000000000000000000000000040"
"0000000000000000000000000000000000000000000000000000000000000080"
"000000000000000000000000000000000000000000000000000000000000001c"
"596f752061726520612068656c7066756c20617373697374616e742e00000000"
"0000000000000000000000000000000000000000000000000000000000000006"
"73797374656d0000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000040"
"0000000000000000000000000000000000000000000000000000000000000080"
"000000000000000000000000000000000000000000000000000000000000000c"
"57686f2061726520796f753f0000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000004"
"7573657200000000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000002"
"0000000000000000000000000000000000000000000000000000000000000040"
"0000000000000000000000000000000000000000000000000000000000000100"
"0000000000000000000000000000000000000000000000000000000000000040"
"0000000000000000000000000000000000000000000000000000000000000080"
"000000000000000000000000000000000000000000000000000000000000000b"
"74656d7065726174757265000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000003"
"302e350000000000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000040"
"0000000000000000000000000000000000000000000000000000000000000080"
"0000000000000000000000000000000000000000000000000000000000000004"
"7365656400000000000000000000000000000000000000000000000000000000"
"0000000000000000000000000000000000000000000000000000000000000002"
"3433000000000000000000000000000000000000000000000000000000000000"
)
dapp_client.send_advance(
hex_payload=INFERENCE_INPUT,
msg_sender=SENDER_ADDRESS,
)
assert dapp_client.rollup.status