Esempio n. 1
0
	def test_keyfix_characters(self):
		count = 0
		for ind, user in enumerate(annotation.user_reader("data/test_key.json")):
			self.inserter.insert(item=user)
			count = ind
		self.inserter.send()
		count_2 = 0
		for ind, user in enumerate(self.inserter.source.find()):
			count_2 = ind
		self.t(count == count_2)
Esempio n. 2
0
def main(argv):
	inserter = BulkInserter(source=Source(host="localhost",port=27017,database=argv[1],collection=argv[2]))
	for doc in annotation.user_reader(argv[0]):
		inserter.insert(item=doc)
	inserter.send()