Exemple #1
0
	def test_init(self):
		bag = BackPack()
		bag.add_stuff('apple',4,10)
		self.assertEquals(bag.show_stuffs(),{'apple':[4,40]})
		self.assertTrue(isinstance,(bag,dict))
Exemple #2
0
 def test_init(self):
     bag = BackPack()
     bag.add_stuff('apple', 4, 10)
     self.assertEquals(bag.show_stuffs(), {'apple': [4, 40]})
     self.assertTrue(isinstance, (bag, dict))
Exemple #3
0
	def test_get_stuff(self):
		bag = BackPack()
		bag.add_stuff('apple',4,10)
		bag.get_stuff('apple',2)
		self.assertEquals(bag.show_stuffs(),{'apple':[2,20]})
Exemple #4
0
 def test_get_stuff(self):
     bag = BackPack()
     bag.add_stuff('apple', 4, 10)
     bag.get_stuff('apple', 2)
     self.assertEquals(bag.show_stuffs(), {'apple': [2, 20]})