示例#1
0
def test_get_first_availability():
    reasons = get_reasons('5ffc744c68dedf073a5b87a2', limit=MAIIA_LIMIT, client=client)
    first_availability, slots_count = get_first_availability(
        '5ffc744c68dedf073a5b87a2', 
        '2021-04-29', 
        reasons, 
        client=client)
    assert slots_count == 7980
    assert first_availability.isoformat() == '2021-05-13T13:40:00+00:00'
示例#2
0
def test_get_first_availability():
    reasons = get_reasons("5ffc744c68dedf073a5b87a2",
                          limit=MAIIA_LIMIT,
                          client=client)
    first_availability, slots_count, appointment_schedules = get_first_availability(
        "5ffc744c68dedf073a5b87a2", "2021-04-29", reasons, client=client)
    assert appointment_schedules == [
        {
            "from": "2021-04-29T00:00:00+02:00",
            "name": "chronodose",
            "to": "2021-04-30T23:59:59+02:00",
            "total": 0
        },
        {
            "from": "2021-04-29T00:00:00+02:00",
            "name": "1_days",
            "to": "2021-04-29T23:59:59+02:00",
            "total": 0
        },
        {
            "from": "2021-04-29T00:00:00+02:00",
            "name": "2_days",
            "to": "2021-04-30T23:59:59+02:00",
            "total": 0
        },
        {
            "from": "2021-04-29T00:00:00+02:00",
            "name": "7_days",
            "to": "2021-05-05T23:59:59+02:00",
            "total": 0
        },
        {
            "from": "2021-04-29T00:00:00+02:00",
            "name": "28_days",
            "to": "2021-05-26T23:59:59+02:00",
            "total": 6570
        },
        {
            "from": "2021-04-29T00:00:00+02:00",
            "name": "49_days",
            "to": "2021-06-16T23:59:59+02:00",
            "total": 7980
        },
    ]
    assert slots_count == 7980
    assert first_availability.isoformat() == "2021-05-13T13:40:00+00:00"