Fix slow tests

This commit is contained in:
medvedev1088
2021-07-25 14:20:28 +07:00
parent b568101c9c
commit 240982bac1
3 changed files with 5 additions and 3 deletions

View File

@@ -78,6 +78,7 @@ For the latest version, check out the repo and call
```bash
> pip3 install -e .[dev,streaming]
> export ETHEREUM_ETL_RUN_SLOW_TESTS=True
> export PROVIDER_URL=<your_porvider_uri>
> pytest -vv
```

View File

@@ -16,7 +16,7 @@ def get_web3_provider(provider_type, read_resource_lambda=None, batch=False):
else:
provider = MockWeb3Provider(read_resource_lambda)
elif provider_type == 'infura':
provider_url = os.environ.get('PROVIDER_URL', 'https://mainnet.infura.io')
provider_url = os.environ.get('PROVIDER_URL', 'https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c')
if batch:
provider = BatchHTTPProvider(provider_url)
else:

View File

@@ -19,7 +19,7 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import os
import pytest
from dateutil.parser import parse
@@ -75,5 +75,6 @@ def test_get_block_range_for_timestamps_fail(start_timestamp, end_timestamp):
def get_new_eth_service():
web3 = Web3(HTTPProvider('https://mainnet.infura.io'))
provider_url = os.environ.get('PROVIDER_URL', 'https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c')
web3 = Web3(HTTPProvider(provider_url))
return EthService(web3)