def test_get_agg_topics( get_container_func, ports_config, query_agg_topics, query_agg_meta, expected_agg_topics, ): get_container, image = get_container_func with get_container(image, ports=ports_config["ports"], env=ENV_MONGODB) as container: wait_for_connection(container) query_database(container, query_agg_topics) query_database(container, query_agg_meta) actual_agg_topics = mongoutils.get_agg_topics( mongo_client(ports_config["port_on_host"]), "aggregate_topics", "aggregate_meta", ) assert actual_agg_topics == expected_agg_topics
def query_aggregate_topics(self): return mongoutils.get_agg_topics( self._client, self._agg_topic_collection, self._agg_meta_collection)