def create_object_Listing_for_sale_with_price_500000(): listing = models.Listing() listing.pricingInfos.price = 500000 listing.pricingInfos.businessType = "SALE" listing.usableAreas = 80 listing.address.geoLocation.location.lat = -23.566583 listing.address.geoLocation.location.lon = -46.689920 return listing
def create_object_Listing_for_rental_with_price_5000_inside_zap_area(): listing = models.Listing() listing.usableAreas = 100 listing.pricingInfos.price = 5000 listing.id = "uk7" listing.pricingInfos.businessType = "RENTAL" listing.address.geoLocation.location.lat = -23.566583 listing.address.geoLocation.location.lon = -46.689920 return listing
def create_object_Listing_for_sale_with_price_400000(): listing = models.Listing() listing.usableAreas = 200 listing.pricingInfos.price = 400000 listing.pricingInfos.businessType = "SALE" listing.id = "uk6" listing.address.geoLocation.location.lat = 0.445532 listing.address.geoLocation.location.lon = 0.3233546 return listing
def create_object_Listing_for_rental_with_price_5000(): listing = models.Listing() listing.pricingInfos.price = 5000 listing.id = "uk1" listing.pricingInfos.businessType = "RENTAL" listing.pricingInfos.monthlyCondoFee = 0 listing.address.geoLocation.location.lat = 0.445532 listing.address.geoLocation.location.lon = 0.3233546 return listing
def create_object_Listing_for_rental_with_price_1000(): listing = models.Listing() listing.pricingInfos.price = 1000 listing.pricingInfos.businessType = "RENTAL" listing.usableAreas = 80 listing.address.geoLocation.location.lat = -23.566583 listing.address.geoLocation.location.lon = -46.689920 listing.pricingInfos.monthlyCondoFee = 300 return listing
def test_filter_any_portal_remove_listings_complete_location(self): listing = models.Listing() listing.address.geoLocation.location.lat = 0.445532 listing.address.geoLocation.location.lon = 0.3233546 listings = [listing] zap_filtered_listings = filters.remove_listings_without_location_filter( listings ) self.assert_(len(zap_filtered_listings) == 1)