def test_returnImage(self): imageDatabase.wipeDatabase() imageDatabase.addImage("test1") imageDatabase.addImage("test2") self.assertEqual(imageDatabase.returnImage("test1")['image'], "test1")
def test_addRating(self): imageDatabase.wipeDatabase() imageDatabase.addImage("test") imageDatabase.addRating("test", "4") ratings = imageDatabase.returnImage("test")['ratings'] self.assertEqual(ratings[0], "4")
def test_removeImage(self): imageDatabase.wipeDatabase() imageDatabase.addImage("test") imageDatabase.removeImage("test") self.assertEqual(imageDatabase.returnImage("test"), None)
def test_addImage(self): imageDatabase.addImage("test") self.assertEqual(imageDatabase.returnImage("test")['image'], "test")