|
8 | 8 | from web3.middleware import SignAndSendRawMiddlewareBuilder |
9 | 9 | from web3.providers.rpc import HTTPProvider |
10 | 10 |
|
| 11 | +from src.core.config import Config |
11 | 12 | from src.core.storage import compose_data_bucket_prefix, compose_results_bucket_prefix |
12 | 13 | from src.core.types import ( |
13 | 14 | ExchangeOracleEventTypes, |
|
32 | 33 | class ServiceIntegrationTest(unittest.TestCase): |
33 | 34 | def setUp(self): |
34 | 35 | self.session = SessionLocal() |
35 | | - self.w3 = Web3(HTTPProvider()) |
| 36 | + self.w3 = Web3(HTTPProvider(Config.localhost.rpc_api)) |
36 | 37 |
|
37 | 38 | self.gas_payer = self.w3.eth.account.from_key(DEFAULT_GAS_PAYER_PRIV) |
38 | 39 | self.w3.middleware_onion.inject( |
@@ -193,12 +194,10 @@ def test_process_recording_oracle_webhooks_invalid_escrow_balance(self): |
193 | 194 | assert updated_webhook.status == OracleWebhookStatuses.pending.value |
194 | 195 | assert updated_webhook.attempts == 1 |
195 | 196 |
|
196 | | - @patch("src.chain.escrow.EscrowClient.get_manifest_url") |
197 | | - def test_process_job_launcher_webhooks_invalid_manifest_url(self, mock_manifest_url): |
198 | | - mock_manifest_url.return_value = "invalid_url" |
| 197 | + def test_process_job_launcher_webhooks_invalid_manifest_url(self): |
199 | 198 | escrow_address = create_escrow(self.w3) |
200 | 199 | fund_escrow(self.w3, escrow_address) |
201 | | - setup_escrow(self.w3, escrow_address) |
| 200 | + setup_escrow(self.w3, escrow_address, manifest="http://localhost/invalid/url") |
202 | 201 |
|
203 | 202 | webhook = self.make_webhook(escrow_address) |
204 | 203 |
|
|
0 commit comments