File: test_issue_18_cancel_status.py

package info (click to toggle)
python-recurring-ical-events 3.3.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,128 kB
  • sloc: python: 2,896; sh: 15; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Test that cancelled events are actually repeated as cancelled."""

import pytest


@pytest.mark.parametrize(
    ("date", "attr", "value"),
    [
        ("20200128", "STATUS", None),
        ("20200129", "STATUS", "CANCELLED"),
        ("20200130", "STATUS", None),
        ("20200128", "TRANSP", "OPAQUE"),
        ("20200129", "TRANSP", "OPAQUE"),
        ("20200130", "TRANSP", "OPAQUE"),
    ],
)
def test_events_are_cancelles(calendars, date, attr, value):
    event = calendars.issue_18_cancel_status.at(date)[0]
    assert event.get(attr) == value