Skip to content

Conversation

mcepl
Copy link

@mcepl mcepl commented Oct 3, 2025

Automatically update a feed's URL when the server sends a redirect (a 301 or 308 status code) and --save-config option is set.

There is a set of tests to confirm that the system correctly saves the new, redirected URL in the feed's settings.

The tests verify that when a feed returns a 301 or 308 redirect status, the new URL is correctly updated in the feed's configuration and persisted. This finalises the implementation and ensures the feature works as intended.

References: #286

@mcepl mcepl force-pushed the 286-save-URL-redirect branch from 9d8dc03 to f2022cc Compare October 3, 2025 17:33
mcepl added 4 commits October 3, 2025 19:53
…test

Add test/__init__.py and rename test/test.py to test/test_main.py.

Signed-off-by: Matěj Cepl <[email protected]>
The `clean_result` method in `test/test.py` did not use any
instance-specific data, so it has been refactored into a
standalone function. This improves code clarity and modularity.

The associated regular expressions have also been moved to the
module level.
Updated test snapshots for 'tails' feeds due to changes in
html2text output. Resolved ResourceWarning in rss2email/feeds.py
doctest by ensuring file closure.
Automatically update a feed's URL when the server sends a
redirect (a 301 or 308 status code) and --save-config option is
set.

There is a set of tests to confirm that the system correctly
saves the new, redirected URL in the feed's settings.

The tests verify that when a feed returns a 301 or 308 redirect
status, the new URL is correctly updated in the feed's
configuration and persisted. This finalises the implementation
and ensures the feature works as intended.

References: rss2email#286
@mcepl mcepl force-pushed the 286-save-URL-redirect branch from f2022cc to 04933ac Compare October 3, 2025 17:54
@mcepl mcepl mentioned this pull request Oct 3, 2025
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.

1 participant