Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.122] - 2024-11-14
### Fixed
[Exchanges] Authorization header

## [2.4.121] - 2024-11-11
### Added
[Exchanges] ENABLE_CCXT_REQUESTS_COUNTER option
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoBot-Trading [2.4.121](https://github.com/Drakkar-Software/OctoBot-Trading/blob/master/CHANGELOG.md)
# OctoBot-Trading [2.4.122](https://github.com/Drakkar-Software/OctoBot-Trading/blob/master/CHANGELOG.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/903b6b22bceb4661b608a86fea655f69)](https://app.codacy.com/gh/Drakkar-Software/OctoBot-Trading?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot-Trading&utm_campaign=Badge_Grade_Dashboard)
[![PyPI](https://img.shields.io/pypi/v/OctoBot-Trading.svg)](https://pypi.python.org/pypi/OctoBot-Trading/)
[![Coverage Status](https://coveralls.io/repos/github/Drakkar-Software/OctoBot-Trading/badge.svg?branch=master)](https://coveralls.io/github/Drakkar-Software/OctoBot-Trading?branch=master)
Expand Down
2 changes: 1 addition & 1 deletion octobot_trading/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# License along with this library.

PROJECT_NAME = "OctoBot-Trading"
VERSION = "2.4.121" # major.minor.revision
VERSION = "2.4.122" # major.minor.revision
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _get_client_config(
api_key=None, secret=None, password=None, uid=None,
auth_token=None, auth_token_header_prefix=None
):
if auth_token is not None:
if auth_token:
headers["Authorization"] = f"{auth_token_header_prefix or ''}{auth_token}"
config = {
'verbose': constants.ENABLE_CCXT_VERBOSE,
Expand Down
13 changes: 13 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ def _tentacles_local_path():
_cleanup()


@pytest_asyncio.fixture
async def skipped_on_github_CI():
if _is_on_github_ci():
pytest.skip(reason="test skipped on github CI")


def _is_on_github_ci():
# Always set to true when GitHub Actions is running the workflow.
# You can use this variable to differentiate when tests are being run locally or by GitHub Actions.
# from https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables
return bool(os.getenv("GITHUB_ACTIONS"))


def _configure_async_test_loop():
if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith('win'):
# use WindowsSelectorEventLoopPolicy to avoid aiohttp connexion close warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import pytest

from tests.exchanges import liquid_exchange_manager as liquid_exchange_manager_fixture, DEFAULT_EXCHANGE_NAME
from tests import skipped_on_github_CI

# All test coroutines will be treated as marked.
pytestmark = pytest.mark.asyncio
Expand Down Expand Up @@ -123,7 +124,7 @@ def default_websocket_exchange(liquid_exchange_manager_fixture):
yield MockedWebSocketExchange(liquid_exchange_manager_fixture.config, liquid_exchange_manager_fixture)


async def test_start_receive_feeds_and_stop(default_websocket_exchange):
async def test_start_receive_feeds_and_stop(default_websocket_exchange, skipped_on_github_CI):
await default_websocket_exchange.init_websocket(
default_websocket_exchange.exchange_manager.exchange_config.traded_time_frames,
default_websocket_exchange.exchange_manager.exchange_config.traded_symbol_pairs,
Expand Down