def test_get_current_week(): expected_range = [ datetime.date(2017, 9, 25), datetime.date(2017, 9, 26), datetime.date(2017, 9, 27), datetime.date(2017, 9, 28), datetime.date(2017, 9, 29), datetime.date(2017, 9, 30), datetime.date(2017, 10, 1) ] current_week = canteen.get_current_week() assert current_week == expected_range
def get_date_range(): return get_current_week() + get_next_week()
def get_date_range(): if datetime.now().weekday() > 4: return get_next_week() else: return get_current_week()
def get_date_range(): today = datetime.date.today() if today.weekday() > 4: return get_next_week() else: return get_current_week()