예제 #1
0
 def testVerifyThatTweetsAreUniqueById(self):
     tw = {"id": 123456}
     self.assertEqual(len(list(Tweet.find(self.g, tw))), 0)
     Tweet.new(self.g, tw)
     self.assertEqual(len(list(Tweet.find(self.g, tw))), 1)
     Tweet.new(self.g, tw)
     self.assertEqual(len(list(Tweet.find(self.g, tw))), 1)
예제 #2
0
 def testVerifyThatTweetsAreUniqueById(self):
     tw = {"id": 123456}
     self.assertEqual(len(list(Tweet.find(self.g, tw))), 0)
     Tweet.new(self.g, tw)
     self.assertEqual(len(list(Tweet.find(self.g, tw))), 1)
     Tweet.new(self.g, tw)
     self.assertEqual(len(list(Tweet.find(self.g, tw))), 1)
예제 #3
0
 def testVerifyThatComplexTweetsAreUniqueById(self):
     tw = {"id": 123456, "text": "Hello world!"}
     short_tw = {"id": 123456}
     self.assertEqual(len(list(Tweet.find(self.g, short_tw))), 0)
     Tweet.new(self.g, short_tw)  # Just the ID
     self.assertEqual(len(list(Tweet.find(self.g, short_tw))), 1)
     Tweet.new(self.g, tw)
     self.assertEqual(len(list(Tweet.find(self.g, short_tw))), 1)
예제 #4
0
 def testVerifyThatComplexTweetsAreUniqueById(self):
     tw = {"id": 123456, "text": "Hello world!"}
     short_tw = {"id": 123456}
     self.assertEqual(len(list(Tweet.find(self.g, short_tw))), 0)
     Tweet.new(self.g, short_tw)  # Just the ID
     self.assertEqual(len(list(Tweet.find(self.g, short_tw))), 1)
     Tweet.new(self.g, tw)
     self.assertEqual(len(list(Tweet.find(self.g, short_tw))), 1)
예제 #5
0
 def testAddTweet(self):
     Tweet.new(self.g, {"id": 123456})
예제 #6
0
 def testAddTweet(self):
     Tweet.new(self.g, {"id": 123456})