From 68bb39b350af4e7e9edcf0f74c912360e435d955 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sat, 17 Feb 2024 10:31:26 -0800 Subject: [PATCH] Use mock prodid in snapshot tests (#296) Use mock prodid in tests --- tests/__snapshots__/test_store.ambr | 10 +++++----- tests/conftest.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/__snapshots__/test_store.ambr b/tests/__snapshots__/test_store.ambr index 78eb8b4..477533a 100644 --- a/tests/__snapshots__/test_store.ambr +++ b/tests/__snapshots__/test_store.ambr @@ -773,7 +773,7 @@ # name: test_modify_todo_rrule_for_this_and_future[ics] ''' BEGIN:VCALENDAR - PRODID:-//github.com/allenporter/ical//6.1.1//EN + PRODID:-//example//1.2.3 VERSION:2.0 BEGIN:VTODO DTSTAMP:20220903T093805 @@ -908,7 +908,7 @@ # name: test_recurring_todo_item_edit_series.3 ''' BEGIN:VCALENDAR - PRODID:-//github.com/allenporter/ical//6.1.1//EN + PRODID:-//example//1.2.3 VERSION:2.0 BEGIN:VTODO DTSTAMP:20240109T100005 @@ -972,7 +972,7 @@ # name: test_recurring_todo_item_edit_single[deleted_series_ics] ''' BEGIN:VCALENDAR - PRODID:-//github.com/allenporter/ical//6.1.1//EN + PRODID:-//example//1.2.3 VERSION:2.0 END:VCALENDAR ''' @@ -1024,7 +1024,7 @@ # name: test_recurring_todo_item_edit_single[next_instance_deleted_ics] ''' BEGIN:VCALENDAR - PRODID:-//github.com/allenporter/ical//6.1.1//EN + PRODID:-//example//1.2.3 VERSION:2.0 BEGIN:VTODO DTSTAMP:20240109T100005 @@ -1057,7 +1057,7 @@ # name: test_recurring_todo_item_edit_single[result_ics] ''' BEGIN:VCALENDAR - PRODID:-//github.com/allenporter/ical//6.1.1//EN + PRODID:-//example//1.2.3 VERSION:2.0 BEGIN:VTODO DTSTAMP:20240109T100005 diff --git a/tests/conftest.py b/tests/conftest.py index 5803f32..d762b92 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -35,7 +35,7 @@ def json_encoder() -> json.JSONEncoder: return DataclassEncoder() -@pytest.fixture +@pytest.fixture(autouse=True) def mock_prodid() -> Generator[None, None, None]: """Mock out the prodid used in tests.""" with patch("ical.calendar.prodid_factory", return_value=PRODID):