def test_room_to_share(self): daft = Daft() daft.set_county('Dublin') daft.set_area('Castleknock') daft.set_listing_type(RentType.ROOMS_TO_SHARE) daft.set_furnished(True) daft.set_min_price(500) daft.set_max_price(1000) daft.set_room_type(RoomType.DOUBLE) listings = daft.search() self.assertTrue(len(listings) > 0)
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)
from daftlistings import Daft, RentType, RoomType, Gender daft = Daft() daft.set_listing_type(RentType.ROOMS_TO_SHARE) daft.set_room_type(RoomType.DOUBLE) daft.set_furnished(True) daft.set_county("Dublin City") daft.set_area("Castleknock") daft.set_gender(Gender.MALE) daft.set_with_photos(True) listings = daft.search() for listing in listings: print(listing.price) print(listing.formalised_address) print(listing.daft_link) print(listing.contact_number) print(" ")