1
0
mirror of https://github.com/b4tman/sync_ics2gcal synced 2025-11-06 05:28:28 +00:00

type annotations - tests

This commit is contained in:
2021-05-01 13:47:02 +03:00
parent 9dab3c5709
commit c41b3a4dbd
2 changed files with 29 additions and 24 deletions

View File

@@ -1,3 +1,5 @@
from typing import Tuple
import pytest
from sync_ics2gcal import CalendarConverter
@@ -26,11 +28,11 @@ LAST-MODIFIED:20180326T120235Z
"""
def ics_test_cal(content):
def ics_test_cal(content: str) -> str:
return "BEGIN:VCALENDAR\r\n{}END:VCALENDAR\r\n".format(content)
def ics_test_event(content):
def ics_test_event(content: str) -> str:
return ics_test_cal("BEGIN:VEVENT\r\n{}END:VEVENT\r\n".format(content))
@@ -68,7 +70,7 @@ def param_events_start_end(request):
return request.param
def test_event_start_end(param_events_start_end):
def test_event_start_end(param_events_start_end: Tuple[str, str, str, str]):
(date_type, ics_str, start, end) = param_events_start_end
converter = CalendarConverter()
converter.loads(ics_str)