<s> import busbus <EOL> from busbus . provider . ctran import CTranProvider <EOL> from . conftest import mock_gtfs_zip <EOL> import arrow <EOL> import pytest <EOL> import responses <EOL> @ pytest . fixture ( scope = '<STR_LIT>' ) <EOL> @ responses . activate <EOL> def ctran_provider ( engine ) : <EOL> responses . add ( responses . GET , CTranProvider . gtfs_url , <EOL> body = mock_gtfs_zip ( '<STR_LIT>' ) , status = <NUM_LIT:200> , <EOL> content_type = '<STR_LIT>' ) <EOL> return CTranProvider ( engine ) <EOL> def test_len_routes ( ctran_provider ) : <EOL> assert len ( list ( ctran_provider . routes ) ) == <NUM_LIT> <EOL> @ pytest . mark . parametrize ( '<STR_LIT>' , [ <EOL> ( u'<STR_LIT>' , <NUM_LIT:4> ) <EOL> ] ) <EOL> def test_43_to_eaton_hall ( ctran_provider , stop_id , count ) : <EOL> stop = ctran_provider . get ( busbus . Stop , stop_id ) <EOL> route = ctran_provider . get ( busbus . Route , u'<STR_LIT>' ) <EOL> assert len ( list ( ctran_provider . arrivals . where ( <EOL> stop = stop , route = route , <EOL> start_time = arrow . get ( '<STR_LIT>' ) , <EOL> end_time = arrow . get ( '<STR_LIT>' ) ) ) ) == count </s>
