Skip to content

Commit 1fd9767

Browse files
Fix comments
1 parent 9f731ac commit 1fd9767

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.6.3] - 2023-11-07
11+
12+
### Fixed
13+
14+
- Add property to connector with `User-Agent` header to third party services
15+
1016
## [1.6.2] - 2023-11-06
1117

1218
### Fixed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
55
[tool.poetry]
66
name = "sekoia-automation-sdk"
77

8-
version = "1.6.2"
8+
version = "1.6.3"
99
description = "SDK to create Sekoia.io playbook modules"
1010
license = "MIT"
1111
readme = "README.md"

sekoia_automation/connector/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _connector_user_agent(self) -> str:
102102
return f"sekoiaio-connector-{self.configuration.intake_key}"
103103

104104
@cached_property
105-
def _http_default_headers(self) -> dict[str, str]:
105+
def http_default_headers(self) -> dict[str, str]:
106106
"""
107107
Contains dict of predefined headers.
108108

tests/connectors/test_connector.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ def test_connector(storage, mocked_trigger_logs):
3636
test_connector.stop()
3737

3838

39+
def test_check_http_default_headers(test_connector):
40+
test_connector.module._manifest = {
41+
"slug": "dummyslug",
42+
"version": "dummyversion",
43+
}
44+
45+
assert test_connector.http_default_headers == {
46+
"User-Agent": "sekoiaio-connector/dummyslug-dummyversion"
47+
}
48+
49+
3950
def test_forward_events(test_connector):
4051
test_connector.forward_events(events=EVENTS)
4152
test_connector.send_event.assert_called_once()

0 commit comments

Comments
 (0)