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

refactor(tests): testing.util.async_request to client.AsyncHTTPClient #4746

Merged

Conversation

sanspareilsmyn
Copy link
Contributor

@sanspareilsmyn sanspareilsmyn commented May 20, 2024

What does this PR address?

Fixes #3411

  • The async_request function in bento.testing.utils performs an action that duplicates the functionality of AsyncHTTPClient in bento.client. Since the Client is correctly implemented, I have refactored the test code to operate using it.
  • Since AsyncHTTPClient use httpx, there's minor datatype change on aiohttp.FormData.

Before submitting:

@sanspareilsmyn sanspareilsmyn requested a review from a team as a code owner May 20, 2024 13:41
@sanspareilsmyn sanspareilsmyn requested review from frostming and removed request for a team May 20, 2024 13:41
@sanspareilsmyn sanspareilsmyn changed the title refactor(tests): refactor testing.util.async_request to client.AsyncHTTPClient refactor(tests): testing.util.async_request to client.AsyncHTTPClient May 20, 2024
Copy link
Contributor

@frostming frostming left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@frostming frostming merged commit e8bfe83 into bentoml:main May 21, 2024
40 of 42 checks passed
@sanspareilsmyn sanspareilsmyn deleted the refactor(tests)-use-async-client branch May 21, 2024 08:21
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.

refactor: migrate current bentoml.testing to use bentoml.client
2 participants