def test_method_not_empty(self): test_cart_instance = Cart() test_rental = {"Type": "Hour", "Time": 2} test_cart_instance.Rentals = [ test_rental, ] return self.assertFalse( test_cart_instance.empty(), "Cart shouldn't be empty if we just added test_rental.")
def test_method_empty(self): test_cart_instance = Cart() test_cart_instance.Rentals = {} return self.assertTrue(test_cart_instance.empty(), "Cart should be empty when it's just created.")