예제 #1
0
def run_queries():
    print("Querying...\n")
    queries = imdb_queries.IMDBQueries().queries()
    for q in queries:
        execute_query(redis_graph,
                      q.description,
                      q.query)
예제 #2
0
 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)
예제 #3
0
 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()
예제 #4
0
 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)