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

chore: Add respx dependency and update unit tests to use mocks #47

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

chyroc
Copy link
Collaborator

@chyroc chyroc commented Sep 30, 2024

  • Added respx dependency for HTTPX mocking
  • Updated all unit tests to execute based on mocks
  • Removed dependency on environment variables for unit tests and remove from ci.yaml configuration

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.85%. Comparing base (19f9840) to head (eb99ac3).
Report is 4 commits behind head on main.

@@             Coverage Diff             @@
##             main      #47       +/-   ##
===========================================
+ Coverage   71.86%   85.85%   +13.98%     
===========================================
  Files          30       30               
  Lines        1134     1258      +124     
===========================================
+ Hits          815     1080      +265     
+ Misses        319      178      -141     
Flag Coverage Δ
85.85% <100.00%> (+13.98%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cozepy/auth/__init__.py 82.91% <100.00%> (+19.09%) ⬆️
cozepy/bots/__init__.py 100.00% <100.00%> (+14.28%) ⬆️
cozepy/chat/__init__.py 69.46% <100.00%> (-15.27%) ⬇️
cozepy/files/__init__.py 100.00% <100.00%> (+42.85%) ⬆️
cozepy/knowledge/documents/__init__.py 97.02% <100.00%> (+22.77%) ⬆️
cozepy/request.py 80.26% <100.00%> (+3.94%) ⬆️
tests/config.py 100.00% <100.00%> (+33.33%) ⬆️
tests/test_auth.py 100.00% <100.00%> (ø)
tests/test_bot.py 100.00% <100.00%> (ø)
tests/test_conversation_message.py 100.00% <100.00%> (+73.91%) ⬆️
... and 3 more

... and 8 files with indirect coverage changes

@chyroc chyroc force-pushed the mock-test branch 3 times, most recently from cf31798 to b8d1dbb Compare September 30, 2024 22:13
@chyroc chyroc merged commit dda66d4 into main Sep 30, 2024
12 checks passed
@chyroc chyroc deleted the mock-test branch September 30, 2024 22:32
@chyroc chyroc added the chore Project maintenance work not related to features and bug fixes label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Project maintenance work not related to features and bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant