'If multiple queries with the same text exist, only ones that are
scheduled to be refreshed are reported by Query.outdated_queries().'

def test_enqueues_only_for_relevant_data_source(self):

    query = self.factory.create_query(schedule='60')
    query2 = self.factory.create_query(schedule='3600', query_text=query.query_text, query_hash=query.query_hash)
    retrieved_at = (utcnow() - datetime.timedelta(minutes=10))
    query_result = self.factory.create_query_result(retrieved_at=retrieved_at, query_text=query.query_text, query_hash=query.query_hash)
    query.latest_query_data = query_result
    query2.latest_query_data = query_result
    self.assertEqual(list(models.Query.outdated_queries()), [query])
