示例#1
0
 def test_key_error_on_update(self, bad_mock):
     """ Test KeyError on update """
     bad_mock.side_effect = KeyError()
     wishlist = Wishlist("fido", "1")
     wishlist.save()
     wishlist.name = 'Fifi'
     wishlist.update()
示例#2
0
	def test_key_error_on_update(self, bad_mock):
		""" Test KeyError on update """
		bad_mock.side_effect = KeyError()
		wishlist =  Wishlist("joan's wishlist", "joan")
		wishlist.save()
		wishlist.name = "joan's wishlist"
		wishlist.update()