Skip to content

Commit

Permalink
Use mock prodid in snapshot tests (#296)
Browse files Browse the repository at this point in the history
Use mock prodid in tests
  • Loading branch information
allenporter authored Feb 17, 2024
1 parent da5040d commit 68bb39b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/__snapshots__/test_store.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
'''
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 68bb39b

Please sign in to comment.