def build_new_claim(): claim_type = input('Enter the type of Claim: \t') description = input('Enter the description of claim: \t') claim_amount = input('Amount of Claim: \t') date_of_incident = input('Date of the Incident: \t') date_of_claim = input('Date of the Claim: \t') is_valid = input('Is the claim valid: \t') claim_repo.create_claim(claim_type, description, claim_amount, date_of_incident, date_of_claim, is_valid)
def create(): claimID = (input('ClaimID: ')) claimtype = input('Enter type of claim: ') description = input('Description: ') claimamount = (input('amount:')) dateofincident = input('date of incident: ') dateofclaim = input('date of claim: ') isvalid = input('is this claim valid yes or no: ') claim_repo.create_claim(claimID, claimtype, description, claimamount, dateofincident, dateofclaim, isvalid)
def test_create_claim_should_return_claim_list(self): # arrange claimtype = "Auto" description = "Car blows up, lame" claimamount = 10000 dateofincident = "12-11-12" dateofclaim = "12-12-12" isvalid = True claim_repo.create_claim(claimtype, description, claimamount, dateofincident, dateofclaim, isvalid) actual = len(claim_repo) expected = '1' self.assertEqual(actual, expected)
print(claim_repo.show_next_claim()) a = input('Do you want to deal with this claim now(y/n)?') if a == 'y': claim_repo.deal_with_claim() elif choice == "3": claim_valid = True claim_id = input('Enter the claim id: ') claim_type = input('Enter the claim type: ') claim_description = input('Enter a claim description: ') amount_damage = input('Amount of damage: ') date_accident_year = int(input('Year of accident: ')) date_accident_month = int(input('Month of accident: ')) date_accident_day = int(input('Day of accident: ')) date_claim_year = int(input('Year of claim: ')) date_claim_month = int(input('Month of claim: ')) date_claim_day = int(input('Day of claim: ')) claim_date = datetime(year=date_claim_year, month=date_claim_month, day=date_claim_day) accident_date = datetime(year=date_accident_year, month=date_accident_month, day=date_accident_day) monthlater = timedelta(days=30) if claim_date > accident_date + monthlater: claim_valid = False claim_repo.create_claim(claim_type, claim_description, amount_damage, accident_date, claim_date, claim_valid) elif choice == '4': exit()