Beispiel #1
0
 def test_limit_is_set(self):
     collection = BsonCollection(
         os.path.dirname(os.path.realpath(__file__)) + '/' +
         config['bson']['valid'])
     collection.set_limit(5)
     self.assertEqual(5, collection.limit)
     collection.set_limit(0)
Beispiel #2
0
 def test_limit_actually_limits(self):
     collection = BsonCollection(
         os.path.dirname(os.path.realpath(__file__)) + '/' +
         config['bson']['valid'])
     collection.get_iterator()
     count = len(
         list(tweet for tweet in collection.set_limit(5).get_iterator()))
     self.assertEqual(5, count)
	def test_limit_actually_limits(self):
		collection = BsonCollection(os.path.dirname(os.path.realpath(__file__)) +'/'+ config['bson']['valid'])
		collection.get_iterator()
		count = len(list(tweet for tweet in collection.set_limit(5).get_iterator()))
		self.assertEqual(5, count)
	def test_limit_is_set(self):
		collection = BsonCollection(os.path.dirname(os.path.realpath(__file__)) +'/'+ config['bson']['valid'])
		collection.set_limit(5)
		self.assertEqual(5, collection.limit)
		collection.set_limit(0)