diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01276b2..1caa03c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ build-test-push-image: - docker build --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --build-arg CM_API_KEY=$CM_API_KEY . - docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m mypy -p coinmetrics -p test --install-types --non-interactive - docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m flake8 coinmetrics - - docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m pytest -n auto test --ignore test/test_data_exporter.py --ignore test/test_rate_limits.py + - docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m pytest -n auto --timeout=60 test --ignore test/test_data_exporter.py --ignore test/test_rate_limits.py - docker run $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA python -m pytest test/test_rate_limits.py - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME diff --git a/Dockerfile b/Dockerfile index 29c6721..7827a65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && \ RUN pip install --upgrade pip -RUN pip install "poetry==1.5.0" pytest-xdist +RUN pip install "poetry==1.5.0" pytest-timeout pytest-xdist COPY pyproject.toml ./poetry.lock ./ RUN poetry config virtualenvs.create false diff --git a/coinmetrics/api_client.py b/coinmetrics/api_client.py index 981c1b6..1b663c8 100644 --- a/coinmetrics/api_client.py +++ b/coinmetrics/api_client.py @@ -7263,7 +7263,7 @@ def blockchain_metadata_tags( "page_size": page_size, "next_page_token": next_page_token, } - return DataCollection(self._get_data, "/blockchain-metadata/tags", params) + return DataCollection(self._get_data, "blockchain-metadata/tags", params) def blockchain_metadata_tagged_entities( self, @@ -7295,7 +7295,7 @@ def blockchain_metadata_tagged_entities( "page_size": page_size, "next_page_token": next_page_token, } - return DataCollection(self._get_data, "/blockchain-metadata/tagged-entities", params) + return DataCollection(self._get_data, "blockchain-metadata/tagged-entities", params) def _get_data(self, url: str, params: Dict[str, Any]) -> DataReturnType: if params: diff --git a/test/test_websocket_methods.py b/test/test_websocket_methods.py index 862caff..ad412dd 100644 --- a/test/test_websocket_methods.py +++ b/test/test_websocket_methods.py @@ -225,19 +225,17 @@ def test_get_asset_quotes_stream() -> None: stream = client.get_stream_asset_quotes(assets="btc") stream.run(on_message=on_message_assets_quotes_test) - @pytest.mark.skipif(not cm_api_key_set, reason=REASON_TO_SKIP) def test_get_market_liquidations() -> None: - stream = client.get_stream_market_liquidations(markets='binance-BTCBUSD-future') + stream = client.get_stream_market_liquidations(markets='binance-LEVERUSDT-future') stream.run(on_message=on_message_market_liquidations_test) @pytest.mark.skipif(not cm_api_key_set, reason=REASON_TO_SKIP) def test_get_market_openinterest() -> None: - stream = client.get_stream_market_open_interest(markets='binance-BTCBUSD-future') + stream = client.get_stream_market_open_interest(markets='binance-LEVERUSDT-future') stream.run(on_message=on_message_market_openinterest) - @pytest.mark.skipif(not cm_api_key_set, reason=REASON_TO_SKIP) def test_on_close() -> None: on_close_ran = False