Skip to content

test(client): add valid_from regression tests for store_memory (DAK-7424) - #190

Merged
ferhimedamine merged 2 commits into
mainfrom
test/store-memory-valid-from
Jul 29, 2026
Merged

test(client): add valid_from regression tests for store_memory (DAK-7424)#190
ferhimedamine merged 2 commits into
mainfrom
test/store-memory-valid-from

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Summary

PR#186 added valid_from to both DakeraClient.store_memory and AsyncDakeraClient.store_memory but did not include dedicated regression tests. Adds 5 unit tests covering the new parameter:

tests/test_memory_extended.pyTestStoreMemoryValidFrom (3 tests)

  • test_store_memory_with_valid_from_includes_field — verifies valid_from is forwarded in request body
  • test_store_memory_without_valid_from_omits_field — verifies field is absent when caller omits it
  • test_store_memory_valid_from_combined_with_other_fields — verifies interop with tags, session_id, ttl_seconds

tests/test_client.pyTestAsyncClientStoreMemoryValidFrom (2 tests)

  • test_store_memory_with_valid_from_includes_field
  • test_store_memory_without_valid_from_omits_field

All 5 tests pass locally. Parity PR: dakera-go Dakera-AI/dakera-go#146

🤖 Generated with Claude Code

…424)

Adds 5 unit tests (3 sync + 2 async) verifying that store_memory()
correctly forwards the valid_from bi-temporal timestamp when set and
omits it when absent. These cover the field added in PR#186 which merged
without dedicated test coverage.

- TestStoreMemoryValidFrom (3 sync tests via responses mock)
- TestAsyncClientStoreMemoryValidFrom (2 async tests via _request patch)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Jul 29, 2026
…DAK-7625)

stdlib `unittest.mock` must precede first-party `dakera.async_client`
imports inside the two async test methods — ruff I001 enforces this order.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ferhimedamine
ferhimedamine merged commit 904aca3 into main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant