Esempio n. 1
0
	def test_returnImage(self):
		imageDatabase.wipeDatabase()
		imageDatabase.addImage("test1")
		imageDatabase.addImage("test2")
		self.assertEqual(imageDatabase.returnImage("test1")['image'], "test1")
Esempio n. 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")
Esempio n. 3
0
	def test_removeImage(self):
		imageDatabase.wipeDatabase()
		imageDatabase.addImage("test")
		imageDatabase.removeImage("test")
		self.assertEqual(imageDatabase.returnImage("test"), None)
Esempio n. 4
0
	def test_addImage(self):
		imageDatabase.addImage("test")
		self.assertEqual(imageDatabase.returnImage("test")['image'], "test")