Exemple #1
0
def test_get_calendars_no_end_date_html():
    today = date.today()
    BookingFactory(start_date=date(today.year, today.month, 3))
    c = HtmlCalendar()
    result = c.get_calendars(count=1)
    assert list is type(result)
    assert 1 == len(result)
    html = result[0]
    assert "<td>02</td>" in html
    assert "<td class='booked'>03</td>" in html
    assert "<td>04</td>" in html
Exemple #2
0
def test_get_calendars():
    _demo_data()
    c = HtmlCalendar()
    result = c.get_calendars()
    assert list is type(result)
    assert 12 == len(result)
Exemple #3
0
def test_get_bookings():
    _demo_data()
    c = HtmlCalendar()
    c._get_bookings()