Example #1
0
def test_get_pt_object_from_list_True_2_objects():
    stop_area = chaos.models.PTobject()
    stop_area.type = 'stop_area'
    stop_area.uri = 'uri1'
    eq_(get_pt_object_from_list(stop_area, [{'id': 'uri2', 'name': 'stop area name'},
                                            {'id': 'uri1', 'name': 'stop area name'}]),
        {'id': 'uri1', 'name': 'stop area name'})
Example #2
0
def test_get_pt_object_from_list_None():
    stop_area = chaos.models.PTobject()
    stop_area.type = 'stop_area'
    stop_area.uri = 'uri1'
    eq_(get_pt_object_from_list(stop_area, []), None)