def test_repayable_amount_output(self): self.assertEquals(calculate_loan_repayable(100000, 12, 12), 112000)
def test_maximum_amount_borrowable(self): self.assertEquals(calculate_loan_repayable(1000000000, 2, 9), "You can only borrow between 5000 and 10000000.")
def test_input_is_positive(self): self.assertEquals(calculate_loan_repayable(10000, -1, -1), "You cannot have values less than 0.")
def test_for_number_of_months( self ): # It makes sure that the number of months are less than 12 as agreed self.assertEquals(calculate_loan_repayable(100000, 13, 11), "Maximum time allowed is 12 months.")
def test_input_is_number(self): self.assertEquals(calculate_loan_repayable("SELECT * FROM", 8, 2), "Input a valid number.")