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

test: improve the mock server experience #1602

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

WilliamBergamin
Copy link
Contributor

@WilliamBergamin WilliamBergamin commented Nov 26, 2024

Summary

This PR aims to improve and simplify the behavior around the mock_web_api_server, it also removed the multiprocessing implementation in favor of the threaded one.

It consolidates the mock_web_api_server into one implementation and where different handlers can be implemented and set to change the behavior of the mock

Also this seems to speed up the test execution by around 1 minute

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@WilliamBergamin WilliamBergamin added the tests M-T: Testing work only label Nov 26, 2024
@WilliamBergamin WilliamBergamin self-assigned this Nov 26, 2024
@WilliamBergamin WilliamBergamin changed the title test: improve the mock serve experience test: improve the mock server experience Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.92%. Comparing base (a5b9db6) to head (59cd4a5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1602   +/-   ##
=======================================
  Coverage   84.91%   84.92%           
=======================================
  Files         113      113           
  Lines       12622    12622           
=======================================
+ Hits        10718    10719    +1     
+ Misses       1904     1903    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seratch seratch added this to the 3.33.5 milestone Nov 27, 2024
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Wow, this is AMAZING! Thanks for improving this

@seratch seratch merged commit fe598cd into slackapi:main Nov 27, 2024
12 checks passed
@WilliamBergamin WilliamBergamin deleted the imrpove-mock-server-logic branch November 27, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-logs-client enhancement M-T: A feature request for new functionality scim-client socket-mode tests M-T: Testing work only Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants