def test_remove_gift(self):
   santa = SantasBag()
   temp = santa.checkGift("Piano", 1)
   self.assertNotEqual(temp, None)
   santa.remove_gift([1, "Piano"])
   temp = santa.checkGift("Piano", 1)
   print(f"Test of Removing Gift from child: {temp}")
   self.assertEqual(temp, None)
   print()
 def test_add_gift(self):
   santa = SantasBag()
   temp = santa.checkChild("Tom")
   santa.add_gift(1,"Piano", "NICE", "Brad")
   santa.add_gift(2, "Bear", "NICE", "Tom")
   temp = santa.checkGift("Bear", 2)
   print(f"Test of Addding Gift to Child: {temp}")
   self.assertEqual(temp, (2, "Bear", 0, 2, 2, "Tom", "NICE"))
   print()
Esempio n. 3
0
 def test_add_gift(self):
     bob = SantasBag()
     bob.add_gift(1, "Piano", "NICE", "Brad")
     temp = bob.checkGift("Piano", 1)
     print(f"Test of Addding Gift to Child: {temp}")