Esempio n. 1
0
def test_fits_period(bh_start_time, bh_end_time, start_time, end_time, expected):
    bh_start_time = datetime.strptime(bh_start_time, '%H:%M').time()
    bh_end_time = datetime.strptime(bh_end_time, '%H:%M').time()
    start_time = datetime.strptime(start_time, '%H:%M').time()
    end_time = datetime.strptime(end_time, '%H:%M').time()
    bh = BookableHours(start_time=bh_start_time, end_time=bh_end_time)
    assert bh.fits_period(start_time, end_time) == expected
def test_fits_period(bh_start_time, bh_end_time, start_time, end_time, expected):
    bh_start_time = datetime.strptime(bh_start_time, '%H:%M').time()
    bh_end_time = datetime.strptime(bh_end_time, '%H:%M').time()
    start_time = datetime.strptime(start_time, '%H:%M').time()
    end_time = datetime.strptime(end_time, '%H:%M').time()
    bh = BookableHours(start_time=bh_start_time, end_time=bh_end_time)
    assert bh.fits_period(start_time, end_time) == expected
def test_fits_period(start_time, end_time, expected):
    start_time = datetime.strptime(start_time, '%H:%M').time()
    end_time = datetime.strptime(end_time, '%H:%M').time()
    bh = BookableHours(start_time=time(12), end_time=time(15))
    assert bh.fits_period(start_time, end_time) == expected