コード例 #1
0
    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'])))
コード例 #2
0
    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'])))
コード例 #3
0
    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()))
コード例 #4
0
    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()))