Ejemplo n.º 1
0
def get_busy_list_5_test():
    """
    Tests busy dict is empty.
    """
    busy = {}

    busy_list = []

    assert busy_list == get_busy_list(busy)
Ejemplo n.º 2
0
def get_busy_list_4_test():
    """
    Tests sequential all day busy times and busy times within the same day.
    """
    busy = {'2015-11-16T09:00:00-08:00':
            {'start': {'dateTime': '2015-11-16T09:00:00-08:00'},
             'end': {'dateTime': '2015-11-16T17:00:00-08:00'}},
            '2015-11-17T09:00:00-08:00':
            {'start': {'dateTime': '2015-11-17T09:00:00-08:00'},
             'end': {'dateTime': '2015-11-17T10:00:00-08:00'}}}

    busy_list = [{'start': {'dateTime': '2015-11-16T09:00:00-08:00'},
                  'end': {'dateTime': '2015-11-17T10:00:00-08:00'}}]

    assert busy_list == get_busy_list(busy)