From b9f3fb8fced854da013ef9d7e767b3a472ac5497 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Wed, 31 Dec 2025 15:09:03 -0800 Subject: [PATCH] more backwards compatibility testing --- .../prebuilt_presets/test_tv_show_by_date.py | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/unit/prebuilt_presets/test_tv_show_by_date.py b/tests/unit/prebuilt_presets/test_tv_show_by_date.py index f8da99a7..115a2a61 100644 --- a/tests/unit/prebuilt_presets/test_tv_show_by_date.py +++ b/tests/unit/prebuilt_presets/test_tv_show_by_date.py @@ -24,3 +24,58 @@ class TestTvShowByDatePreset: "overrides": {"tv_show_directory": "abc", "s01_url": "test"}, }, ) + + def test_backward_compatibility_single(self, default_config): + a = Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "url": "test_1"}, + }, + ) + + b = Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "subscription_value": "test_1"}, + }, + ) + + assert a.resolved_yaml() == b.resolved_yaml() + + def test_backward_compatibility_multi(self, default_config): + a = Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "url": "test_1", "url2": "test_2"}, + }, + ) + + b = Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": { + "tv_show_directory": "abc", + "subscription_array": ["test_1", "test_2"], + }, + }, + ) + + c = Subscription.from_dict( + config=default_config, + preset_name="a", + preset_dict={ + "preset": "Jellyfin TV Show by Date", + "overrides": {"tv_show_directory": "abc", "urls": ["test_1", "test_2"]}, + }, + ) + + assert a.resolved_yaml() == b.resolved_yaml() + assert a.resolved_yaml() == c.resolved_yaml()