def testSearch(self): self.clean_domain([Service]) self.create_service(u'Delivery', 25).sellable.code = u'1' self.create_service(u'Painting', 12).sellable.code = u'2' search = ServiceSearch(self.store) search.search.refresh() self.check_search(search, 'service-no-filter') search.set_searchbar_search_string('e') search.search.refresh() self.check_search(search, 'service-description-filter')
def test_search(self): self.clean_domain([Service]) self.create_service(u'Delivery', 25).sellable.code = u'1' self.create_service(u'Painting', 12).sellable.code = u'2' # clean_domain will remove the delivery service, but SellableSearch # needs it to do the "exclude delivery service" logic. In this case, # we are working around that and also making sure that this service # will appear on the list (this is the only search that should show it) with self.sysparam(DELIVERY_SERVICE=self.create_service(u"My Delivery")): search = ServiceSearch(self.store) search.search.refresh() self.check_search(search, 'service-no-filter') search.set_searchbar_search_string('e') search.search.refresh() self.check_search(search, 'service-description-filter')
def test_search(self): self.clean_domain([Service]) self.create_service(u'Delivery', 25).sellable.code = u'1' self.create_service(u'Painting', 12).sellable.code = u'2' # clean_domain will remove the delivery service, but SellableSearch # needs it to do the "exclude delivery service" logic. In this case, # we are working around that and also making sure that this service # will appear on the list (this is the only search that should show it) with self.sysparam( DELIVERY_SERVICE=self.create_service(u"My Delivery")): search = ServiceSearch(self.store) search.search.refresh() self.check_search(search, 'service-no-filter') search.set_searchbar_search_string('e') search.search.refresh() self.check_search(search, 'service-description-filter')