boarddata 4.4.4__tar.gz → 4.4.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {boarddata-4.4.4 → boarddata-4.4.6}/PKG-INFO +1 -1
- {boarddata-4.4.4 → boarddata-4.4.6}/__init__.py +1 -1
- {boarddata-4.4.4 → boarddata-4.4.6}/_auditors.py +21 -1
- {boarddata-4.4.4 → boarddata-4.4.6}/boarddata.egg-info/PKG-INFO +1 -1
- {boarddata-4.4.4 → boarddata-4.4.6}/pyproject.toml +1 -1
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_auditors.py +20 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/CLAUDE.md +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/README.md +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_assemblies.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_base.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_comex.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_companies.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_criteria.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_directors.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_documents.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_esg.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_indexes.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_persons.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_sentinel.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/_utilities.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/boarddata.egg-info/SOURCES.txt +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/boarddata.egg-info/dependency_links.txt +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/boarddata.egg-info/requires.txt +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/boarddata.egg-info/top_level.txt +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/cache.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/client.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/errors.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/py.typed +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/setup.cfg +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/__init__.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/conftest.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_assemblies.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_base.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_build_payload.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_cache.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_comex.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_companies.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_config.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_criteria.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_directors.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_documents.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_esg.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_indexes.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_persons.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_sentinel.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/tests/test_utilities.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/__init__.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/assemblies.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/auditors.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/comex.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/companies.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/core.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/criteria.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/directors.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/documents.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/esg.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/indexes.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/persons.py +0 -0
- {boarddata-4.4.4 → boarddata-4.4.6}/types/sentinel.py +0 -0
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
-
from .types.auditors import AuditorCompensationItem, AuditorCreateResponse, AuditorDetail
|
|
8
|
+
from .types.auditors import AuditorCompanyItem, AuditorCompensationItem, AuditorCreateResponse, AuditorDetail
|
|
9
9
|
from .types.core import FieldSourcePayload, PaginatedResponse
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger("boarddata")
|
|
@@ -153,6 +153,26 @@ class AuditorMixin:
|
|
|
153
153
|
"""
|
|
154
154
|
return self._get("auditor-companies/", **params) # type: ignore[attr-defined]
|
|
155
155
|
|
|
156
|
+
def create_auditor_company(
|
|
157
|
+
self,
|
|
158
|
+
name: str,
|
|
159
|
+
country: str = "",
|
|
160
|
+
) -> AuditorCompanyItem:
|
|
161
|
+
"""Create an auditor company (get-or-create on the server).
|
|
162
|
+
|
|
163
|
+
Args:
|
|
164
|
+
name: Audit firm name (e.g. ``"Deloitte & Associés"``).
|
|
165
|
+
country: ISO 3166-1 alpha-2 country code (e.g. ``"FR"``).
|
|
166
|
+
|
|
167
|
+
Returns:
|
|
168
|
+
AuditorCompanyItem with id, name, and country.
|
|
169
|
+
|
|
170
|
+
Raises:
|
|
171
|
+
BoardDataError: On non-2xx API response.
|
|
172
|
+
"""
|
|
173
|
+
payload = self._build_payload(name=name, country=country) # type: ignore[attr-defined]
|
|
174
|
+
return self._post("auditor-companies/", payload) # type: ignore[attr-defined]
|
|
175
|
+
|
|
156
176
|
# ------------------------------------------------------------------
|
|
157
177
|
# Auditor compensations
|
|
158
178
|
# ------------------------------------------------------------------
|
|
@@ -38,6 +38,26 @@ class TestCreateAuditor:
|
|
|
38
38
|
assert payload["auditor_type"] == "PRINCIPAL"
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
class TestCreateAuditorCompany:
|
|
42
|
+
def test_sends_name_and_country(self):
|
|
43
|
+
c = make_client()
|
|
44
|
+
c._request.return_value = {"id": "ac1", "name": "Deloitte", "country": "FR"}
|
|
45
|
+
result = c.create_auditor_company("Deloitte", "FR")
|
|
46
|
+
_, kwargs = c._request.call_args
|
|
47
|
+
payload = kwargs["json"]
|
|
48
|
+
assert payload["name"] == "Deloitte"
|
|
49
|
+
assert payload["country"] == "FR"
|
|
50
|
+
assert result["id"] == "ac1"
|
|
51
|
+
|
|
52
|
+
def test_country_defaults_to_empty(self):
|
|
53
|
+
c = make_client()
|
|
54
|
+
c._request.return_value = {"id": "ac2", "name": "KPMG", "country": ""}
|
|
55
|
+
c.create_auditor_company("KPMG")
|
|
56
|
+
_, kwargs = c._request.call_args
|
|
57
|
+
payload = kwargs["json"]
|
|
58
|
+
assert payload["country"] == ""
|
|
59
|
+
|
|
60
|
+
|
|
41
61
|
class TestCreateAuditorCompensation:
|
|
42
62
|
def test_sends_audit_fields(self):
|
|
43
63
|
c = make_client()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|