def METHOD_NAME(self):
    query1 = get_case_search_query(
        self.domain,
        ['a'],
        {'_xpath_query': "ancestor-exists(host, city='BOS')"},
    )
    self.assertItemsEqual(query1.get_ids(), ['a2'])