Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Consider mocking network calls instead of relying on external services.
Changing from
httpstat.us/500tometa.miraheze.org/cacheintroduces network dependency that can make the test unreliable. The real endpoint may return successful responses, potentially causing the test to fail unexpectedly since it expectscheck_upto returnFalse.For more reliable testing, consider mocking the network call to ensure consistent behaviour regardless of external service availability.
🏁 Script executed:
Length of output: 776
🏁 Script executed:
Length of output: 3449
Mock the HTTP request in test_check_up_debug_fail to remove external dependencies
Relying on a live endpoint makes this test fragile. Instead, patch
requests.getso you can control the response:• Import the patch decorator:
• In the test, set up the fake response to return a 500 status and empty body/headers so
check_up(..., force=True)cleanly returns False without hitting the network.Suggested diff:
This ensures the test is deterministic and fast, without relying on external services.
🤖 Prompt for AI Agents