def test_incomplete_keys(self): cells = CellAreaFactory.build_batch(4) cells[0].radio = None cells[1].mcc = None cells[2].mnc = None cells[3].lac = None with self.db_call_checker() as check_db_calls: query = self.model_query(cells=cells) results = self.source.result_type().new_list() self.assertFalse(self.source.should_search(query, results)) check_db_calls(rw=0, ro=0)
def test_incomplete_keys(self): cells = CellAreaFactory.build_batch(4) cells[0].radio = None cells[1].mcc = None cells[2].mnc = None cells[3].lac = None with self.db_call_checker() as check_db_calls: query = self.model_query(cells=cells) results = self.source.result_list() self.assertFalse(self.source.should_search(query, results)) check_db_calls(rw=0, ro=0)
def test_incomplete_keys(self, geoip_db, http_session, session_tracker, session, source): cells = CellAreaFactory.build_batch(4) cells[0].radio = None cells[1].mcc = None cells[2].mnc = None cells[3].lac = None query = self.model_query(geoip_db, http_session, session, cells=cells) results = source.result_list() assert not source.should_search(query, results) session_tracker(0)
def test_incomplete_keys(self, geoip_db, http_session, session_tracker, session, source, stats): cells = CellAreaFactory.build_batch(4) cells[0].radio = None cells[1].mcc = None cells[2].mnc = None cells[3].lac = None query = self.model_query( geoip_db, http_session, session, stats, cells=cells) results = source.result_list() assert not source.should_search(query, results) session_tracker(0)