def test_room_to_share(self): daft = Daft() daft.set_county("Dublin") daft.set_listing_type(RentType.ROOMS_TO_SHARE) daft.set_with_photos(True) daft.set_ensuite_only(True) daft.set_furnished(True) daft.set_num_occupants(2) daft.set_min_price(500) daft.set_max_price(1000) daft.set_room_type(RoomType.DOUBLE) listings = daft.search(fetch_all=False) self.assertTrue(len(listings) > 0)
def test_apartments_to_let(self): daft = Daft() daft.set_county("Dublin") daft.set_couples_accepted(True) daft.set_with_photos(True) daft.set_ensuite_only(True) daft.set_area_type(AreaType.TRANSPORT_ROUTE) daft.set_public_transport_route(TransportRoute.DART) daft.set_listing_type(RentType.APARTMENTS) daft.set_added_since(7) daft.set_gender(Gender.EITHER) listings = daft.search() self.assertTrue(len(listings) > 0)