コード例 #1
0
 def test_repayable_amount_output(self):
     self.assertEquals(calculate_loan_repayable(100000, 12, 12), 112000)
コード例 #2
0
 def test_maximum_amount_borrowable(self):
     self.assertEquals(calculate_loan_repayable(1000000000, 2, 9),
                       "You can only borrow between 5000 and 10000000.")
コード例 #3
0
 def test_input_is_positive(self):
     self.assertEquals(calculate_loan_repayable(10000, -1, -1),
                       "You cannot have values less than 0.")
コード例 #4
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.")
コード例 #5
0
 def test_input_is_number(self):
     self.assertEquals(calculate_loan_repayable("SELECT * FROM", 8, 2),
                       "Input a valid number.")