File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ class TestModel(DbAsyncConn):
10
10
async def test_contract (self , session : AsyncSession ):
11
11
contract = Contract (address = b"a" , name = "A test contract" , chain_id = 1 )
12
12
await contract .create (session )
13
- await contract .create (session )
14
13
result = await contract .get_all (session )
15
14
self .assertEqual (result [0 ], contract )
16
15
Original file line number Diff line number Diff line change @@ -17,12 +17,18 @@ def setUpClass(cls):
17
17
18
18
@database_session
19
19
async def test_view_contracts (self , session : AsyncSession ):
20
- contract = Contract (address = b"a" , name = "A Test Contracts" , chain_id = 1 )
20
+ contract = Contract (
21
+ address = b"0xe94B2EC38FA88bDc8cA9110b24deB5341ECeF251" ,
22
+ name = "A Test Contracts" ,
23
+ chain_id = 1 ,
24
+ )
21
25
expected_response = {
22
26
"name" : "A Test Contracts" ,
23
27
"description" : None ,
24
- "address" : "a " ,
28
+ "address" : "0xe94B2EC38FA88bDc8cA9110b24deB5341ECeF251 " ,
25
29
}
26
30
await contract .create (session )
27
- response = self .client .get ("/api/v1/contracts" )
31
+ response = self .client .get (
32
+ "/api/v1/contracts/0xe94B2EC38FA88bDc8cA9110b24deB5341ECeF251"
33
+ )
28
34
self .assertEqual (response .status_code , 200 )
You can’t perform that action at this time.
0 commit comments