Skip to content

Commit a42bc7d

Browse files
feat(float): upgrade SDK to 2.0.0, add pytest unit tests (#284)
* feat(float): upgrade SDK to 2.0.0, add pytest unit tests - Bump autohive-integrations-sdk pin from ==1.0.2 to ~=2.0.0 - Update all context.fetch() call sites to access .data on FetchResponse - Fix connected account handler to use response.data for isinstance check - Bump config.json version to 2.0.0 - Create float/tests/conftest.py with standard sys.path insert - Create float/tests/test_float_unit.py with 71 unit tests covering people, projects, tasks, time off, logged time, clients, departments, roles, reference data, holidays, phases, milestones, reports, and auth header verification * fix(float): apply Kai SDK skills — fix tests, FetchResponse, ResultType assertions - Add ActionError import and convert all raise Exception() error paths to return ActionError(message=...) - Fix action handlers to use response.data from FetchResponse - Fix connected account handler to use response.data - Replace integration-style test_float.py with proper unit tests split by domain - 106 unit tests across 5 files: people, projects, tasks, timeoff, misc - All tests use FetchResponse mocks and ResultType.ACTION_ERROR assertions per skill * fix(float): fix 3 error path tests to use ResultType.ACTION_ERROR instead of pytest.raises * fix(float): fix auth, optional params, add proper unit and integration tests * fix(float): bump SDK to 2.0.0, format tests, verify 5/5 live integration tests passing * fix(float): bump version to 2.0.0, fix isinstance to use response.data * style(float): apply ruff formatting * fix(float): remove os.chdir, delete broken legacy test_float.py and context.py * test(float): expand integration tests to cover all 52 actions * fix(float): fix config.json output schemas and integration test assertions - Make all output schema field types nullable to match Float API reality (API returns null for many optional fields that were typed as non-nullable) - Change `active` field type from boolean to [integer, boolean, null] since Float API returns 1/0 integers, not booleans - Fix list_statuses to return [] instead of None on 204 No Content response - Fix integration test assertions: - List endpoints: assert isinstance(data, list) not wrapped key access - Get endpoints: assert isinstance(data, dict) not wrapped key access - Use task_meta_id fallback for project_task items (API uses different key) - Use id fallback for public_holiday and project_stage items - Destructive tests: access fields directly on dict not via nested wrapper * style(float): apply ruff formatting to test_float_integration.py --------- Co-authored-by: Shubhank <72601061+Sagsgit@users.noreply.github.com> Co-authored-by: Kai Koenig <kai@ventego-creative.co.nz>
1 parent f40054c commit a42bc7d

14 files changed

Lines changed: 6442 additions & 3985 deletions

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
# -- Xero --
6161
# (uses platform OAuth — tokens are short-lived, typically not set here)
6262

63+
# -- Gong --
64+
# GONG_ACCESS_KEY=
65+
# GONG_ACCESS_KEY_SECRET=
66+
67+
# -- Float --
68+
# FLOAT_API_KEY=
6369
# -- Supadata --
6470
# SUPADATA_API_KEY=
6571
# -- LinkedIn --

0 commit comments

Comments
 (0)