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

Add iter_lines Method to FastHttpSession Class #3024

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

MasterKey-Pro
Copy link

@MasterKey-Pro MasterKey-Pro commented Jan 8, 2025

1、Add iter_lines Method to FastHttpSession Class
2、fix: Remove trailing whitespace from blank line in fasthttp.py to comply with PEP 8

Fixes #3018

MasterKey-Pro and others added 5 commits January 6, 2025 09:15
在 FastHttpSession 类中添加 iter_lines 方法
Reuses the logic of the request method and provides type annotations to enhance code readability and consistency.
fix: Remove trailing whitespace from blank line in fasthttp.py to comply with PEP 8
fix: fasthttp.py to comply with PEP 8
@cyberw
Copy link
Collaborator

cyberw commented Jan 8, 2025

Looks good, but can you add a test case too? (in test_fasthttp.py)

@MasterKey-Pro MasterKey-Pro reopened this Jan 9, 2025
@MasterKey-Pro
Copy link
Author

The lack of an endpoint that can return streaming data or a simulated response might be the reason for the test failure.

@cyberw
Copy link
Collaborator

cyberw commented Jan 9, 2025

Can you use the /streaming/:int: endpoint defined here?

@app.route("/streaming/<int:iterations>")

@MasterKey-Pro
Copy link
Author

您可以使用此处定义的 /streaming/:int: 端点吗?

@app.route("/streaming/<int:iterations>")

I have just completed the implementation of the iter_lines method in FastHttpSession and successfully passed all related tests. I look forward to your review and feedback on this part of the work.

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.

Suggestion to Add "iter_lines" Support for "FastHttpUser" in Locust
2 participants