Пример #1
0
	def test_returnImage(self):
		imageDatabase.wipeDatabase()
		imageDatabase.addImage("test1")
		imageDatabase.addImage("test2")
		self.assertEqual(imageDatabase.returnImage("test1")['image'], "test1")
Пример #2
0
	def test_addRating(self):
		imageDatabase.wipeDatabase()
		imageDatabase.addImage("test")
		imageDatabase.addRating("test", "4")
		ratings = imageDatabase.returnImage("test")['ratings']
		self.assertEqual(ratings[0], "4")
Пример #3
0
	def test_removeImage(self):
		imageDatabase.wipeDatabase()
		imageDatabase.addImage("test")
		imageDatabase.removeImage("test")
		self.assertEqual(imageDatabase.returnImage("test"), None)
Пример #4
0
	def test_addImage(self):
		imageDatabase.addImage("test")
		self.assertEqual(imageDatabase.returnImage("test")['image'], "test")