← Back to team overview

zeitgeist team mailing list archive

[Merge] lp:~zeitgeist/zeitgeist/related-remote-tests into lp:zeitgeist

 

Seif Lotfy has proposed merging lp:~zeitgeist/zeitgeist/related-remote-tests into lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)


The algorithm sends out the proper results. The test case was wrong. However for assurance i added 2 tests of which results are easy to calculate
-- 
https://code.launchpad.net/~zeitgeist/zeitgeist/related-remote-tests/+merge/31537
Your team Zeitgeist Framework Team is requested to review the proposed merge of lp:~zeitgeist/zeitgeist/related-remote-tests into lp:zeitgeist.
=== modified file 'test/remote-test.py'
--- test/remote-test.py	2010-07-26 08:52:19 +0000
+++ test/remote-test.py	2010-08-02 13:19:41 +0000
@@ -285,8 +285,11 @@
 		events = parse_events("test/data/apriori_events.js")
 		self.insertEventsAndWait(events)
 		
-		uris = self.findRelatedAndWait(["i4"], num_events=4, result_type=0)
-		self.assertEquals(set(uris), set(["i2", "i1", "i3", "i5"]))
+		uris = self.findRelatedAndWait(["i2"], num_events=2, result_type=1)
+		self.assertEquals(uris, ["i3", "i1"])
+		
+		uris = self.findRelatedAndWait(["i2"], num_events=2, result_type=0)
+		self.assertEquals(uris, ["i1", "i3"])
 		
 	def testFindEventsForValues(self):
 		mainloop = gobject.MainLoop() # we don't have an *AndWait-helper method