Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added threads tests #54

Merged
merged 14 commits into from
Dec 19, 2024
Merged

Added threads tests #54

merged 14 commits into from
Dec 19, 2024

Conversation

cszsol
Copy link
Collaborator

@cszsol cszsol commented Nov 20, 2024

No description provided.

@cszsol cszsol changed the title Added tests Added threads tests Nov 20, 2024
Copy link
Contributor

@WonderPG WonderPG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoints should rather be tested with the dependency override mechanism of FastAPI. We had these tests in neuroagent previously, and in theory they had little links to langchain so few of them will need modifications. Thank you for handling this though !

swarm_copy/tools/bluenaas_memodel_getall.py Outdated Show resolved Hide resolved
swarm_copy_tests/app/routers/test_threads.py Outdated Show resolved Hide resolved
swarm_copy_tests/app/routers/test_threads.py Outdated Show resolved Hide resolved
swarm_copy_tests/app/routers/test_threads.py Outdated Show resolved Hide resolved
swarm_copy_tests/conftest.py Outdated Show resolved Hide resolved
swarm_copy_tests/conftest.py Outdated Show resolved Hide resolved
swarm_copy_tests/conftest.py Outdated Show resolved Hide resolved
@kanesoban
Copy link
Collaborator

The endpoints should rather be tested with the dependency override mechanism of FastAPI. We had these tests in neuroagent previously, and in theory they had little links to langchain so few of them will need modifications. Thank you for handling this though !

My thinking was that unit tests should only test the function and mock anything else

https://stackoverflow.com/questions/5357601/whats-the-difference-between-unit-tests-and-integration-tests

When you don't mock the depended functions and let the function have side effects such as writing to a DB, that is usually called an integration test.
But since we don't have dedicated integration tests, I guess it is OK to do it this way.

@BoBer78 BoBer78 merged commit c6a7d0e into main Dec 19, 2024
5 checks passed
@BoBer78 BoBer78 deleted the test_threads branch December 19, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants