langchain-mongodb: add unit tests for MongoDBChatMessageHistory (#18599)

## Description
Adding in Unit Test variation for `MongoDBChatMessageHistory` package
Follow-up to #18590 

- [x] **Add tests and docs**: Unit test is what's being added
  

- [x] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. See contribution
guidelines for more: https://python.langchain.com/docs/contributing/
This commit is contained in:
Jib
2024-03-05 14:44:31 -05:00
committed by GitHub
parent 48e303ea10
commit fc35262356
3 changed files with 49 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ def test_memory_with_message_store() -> None:
assert "This is me, the AI" in messages_json
assert "This is me, the human" in messages_json
# remove the record from Azure Cosmos DB, so the next test run won't pick it up
# remove the record from MongoDB, so the next test run won't pick it up
memory.chat_memory.clear()
assert memory.chat_memory.messages == []