@@ -15,13 +15,11 @@ def test_get_workers(self):
1515 mock_worker_1 = {
1616 "id" : "worker1" ,
1717 "address" : "0x1234567890123456789012345678901234567890" ,
18- "totalHMTAmountReceived" : "1000" ,
1918 "payoutCount" : 5 ,
2019 }
2120 mock_worker_2 = {
2221 "id" : "worker2" ,
2322 "address" : "0x9876543210987654321098765432109876543210" ,
24- "totalHMTAmountReceived" : "2000" ,
2523 "payoutCount" : 10 ,
2624 }
2725
@@ -31,7 +29,7 @@ def test_get_workers(self):
3129
3230 filter = WorkerFilter (
3331 chain_id = ChainId .POLYGON_AMOY ,
34- order_by = "totalHMTAmountReceived " ,
32+ order_by = "payoutCount " ,
3533 order_direction = OrderDirection .ASC ,
3634 )
3735
@@ -44,14 +42,16 @@ def test_get_workers(self):
4442 "address" : None ,
4543 "first" : 10 ,
4644 "skip" : 0 ,
47- "orderBy" : "totalHMTAmountReceived " ,
45+ "orderBy" : "payoutCount " ,
4846 "orderDirection" : "asc" ,
4947 },
5048 options = None ,
5149 )
5250 self .assertEqual (len (workers ), 2 )
5351 self .assertEqual (workers [0 ].id , "worker1" )
5452 self .assertEqual (workers [1 ].id , "worker2" )
53+ self .assertEqual (workers [0 ].payout_count , 5 )
54+ self .assertEqual (workers [1 ].payout_count , 10 )
5555
5656 def test_get_workers_empty_response (self ):
5757 with patch (
@@ -93,7 +93,6 @@ def test_get_worker(self):
9393 mock_worker = {
9494 "id" : "worker1" ,
9595 "address" : "0x1234567890123456789012345678901234567890" ,
96- "totalHMTAmountReceived" : "1000" ,
9796 "payoutCount" : 5 ,
9897 }
9998
@@ -115,6 +114,7 @@ def test_get_worker(self):
115114 self .assertEqual (
116115 worker .address , "0x1234567890123456789012345678901234567890"
117116 )
117+ self .assertEqual (worker .payout_count , 5 )
118118
119119 def test_get_worker_empty_data (self ):
120120 with patch (
0 commit comments