def test_seloger_rent_personal(self): query = Query() query.area_min = 20 query.cost_max = 1500 query.type = POSTS_TYPES.RENT query.advert_types = [ADVERT_TYPES.PROFESSIONAL] query.cities = [] for city in self.backend.search_city('paris'): city.backend = self.backend.name query.cities.append(city) self.check_against_query(query)
def test_entreparticuliers_professional(self): query = Query() query.cities = [] for city in self.backend.search_city('lille'): city.backend = self.backend.name query.cities.append(city) query.type = POSTS_TYPES.SALE query.house_types = [HOUSE_TYPES.HOUSE] query.advert_types = [ADVERT_TYPES.PROFESSIONAL] results = list( itertools.islice(self.backend.search_housings(query), 0, 20)) self.assertEqual(len(results), 0)
def test_logicimmo_personal(self): query = Query() query.area_min = 20 query.cost_max = 900 query.type = POSTS_TYPES.RENT query.advert_types = [ADVERT_TYPES.PERSONAL] query.cities = [] for city in self.backend.search_city('paris'): city.backend = self.backend.name query.cities.append(city) results = list(self.backend.search_housings(query)) self.assertEqual(len(results), 0)
def test_pap_professional(self): query = Query() query.area_min = 20 query.cost_max = 900 query.type = POSTS_TYPES.RENT query.advert_types = [ADVERT_TYPES.PROFESSIONAL] query.cities = [] for city in self.backend.search_city('paris'): city.backend = self.backend.name query.cities.append(city) results = list(self.backend.search_housings(query)) self.assertEqual(len(results), 0)
def test_seloger_rent_personal(self): query = Query() query.area_min = 20 query.cost_max = 1500 query.type = POSTS_TYPES.RENT query.advert_types = [ADVERT_TYPES.PERSONAL] query.cities = [] for city in self.backend.search_city('paris'): city.backend = self.backend.name query.cities.append(city) results = self.check_housing_lists(query) housing = self.backend.get_housing(results[0].id) self.check_single_housing(housing, results[0].advert_type)