def test_it_should_find_by_field(self): """Should return a station with given spec""" result = self.filter(find('id', int(AVAILABLE_STATION['idestacion'])), (AVAILABLE_STATION, NO_BIKES_STATION)) assert_that(result, is_( has_property('idestacion', AVAILABLE_STATION['idestacion'])))
def test_it_should_find_by_field(self): """Should return a station with given spec""" result = self.filter(find('id', int(AVAILABLE_STATION['idestacion'])), (AVAILABLE_STATION, NO_BIKES_STATION)) assert_that( result, is_(has_property('idestacion', AVAILABLE_STATION['idestacion'])))
def test_it_should_return_none_when_not_found(self): result = self.filter(find('id', 0), (AVAILABLE_STATION, NO_BIKES_STATION)) assert_that(result, is_(none()))