Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vladyslav-huriev committed Nov 7, 2023
1 parent 9f731ac commit 1fd9767
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.6.3] - 2023-11-07

### Fixed

- Add property to connector with `User-Agent` header to third party services

## [1.6.2] - 2023-11-06

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "sekoia-automation-sdk"

version = "1.6.2"
version = "1.6.3"
description = "SDK to create Sekoia.io playbook modules"
license = "MIT"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion sekoia_automation/connector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _connector_user_agent(self) -> str:
return f"sekoiaio-connector-{self.configuration.intake_key}"

@cached_property
def _http_default_headers(self) -> dict[str, str]:
def http_default_headers(self) -> dict[str, str]:
"""
Contains dict of predefined headers.
Expand Down
11 changes: 11 additions & 0 deletions tests/connectors/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ def test_connector(storage, mocked_trigger_logs):
test_connector.stop()


def test_check_http_default_headers(test_connector):
test_connector.module._manifest = {
"slug": "dummyslug",
"version": "dummyversion",
}

assert test_connector.http_default_headers == {
"User-Agent": "sekoiaio-connector/dummyslug-dummyversion"
}


def test_forward_events(test_connector):
test_connector.forward_events(events=EVENTS)
test_connector.send_event.assert_called_once()
Expand Down

0 comments on commit 1fd9767

Please sign in to comment.