def detect(doc): try: results = search.search('scrapi', doc.get('id').get('service_id')) except ElasticHttpNotFoundError: return False if len(results) != 0: return True else: return False
def test_delete_doc(self): search.delete_doc('test', 'article', '38') results, count = search.search('test', 'test') assert len(results) == count assert len(results) == 0
def test_search(self): results, count = search.search('test', 'test') assert len(results) == count assert len(results) == 1