def run_queries(): print("Querying...\n") queries = imdb_queries.IMDBQueries().queries() for q in queries: execute_query(redis_graph, q.description, q.query)
def __init__(self): super(testImdbFlow, self).__init__() global redis_graph global queries redis_con = self.env.getConnection() redis_graph = Graph(imdb_utils.graph_name, redis_con) actors, movies = imdb_utils.populate_graph(redis_con, redis_graph) queries = imdb_queries.IMDBQueries(actors, movies)
def setUp(self): global imdb global queries global redis_graph redis_con = self.env.getConnection() redis_graph = Graph(imdb_utils.graph_name, redis_con) actors, movies = imdb_utils.populate_graph(redis_con, redis_graph) imdb = imdb_queries.IMDBQueries(actors, movies) queries = imdb.queries()
def setUpClass(cls): print "ImdbFlowTest" global redis_graph global queries cls.r = redis() cls.r.start() redis_con = cls.r.client() redis_graph = Graph(imdb_utils.graph_name, redis_con) actors, movies = imdb_utils.populate_graph(redis_con, redis_graph) queries = imdb_queries.IMDBQueries(actors, movies)