示例#1
0
 def test_init(self):
     self.assertEqual(len(self.test_db.insureds),1)
     new_db = hp.DataBase(self.test_holder,self.new_insured)
     self.assertEqual(len(new_db.insureds),2)
     with self.assertRaises(ValueError):
         # just make everything wrong
         hp.Insured("Jon",1,"14-14-14","120312031",4,[],[])
示例#2
0
 def test_init(self):
     with self.assertRaises(AssertionError):
         # input a bad ssn format
         hp.Insured("John Smith","N/A","1994-01-01","111-112-1234",True,["Peanut Butter","Oxygen"],["Fever","Arrythmia"])
     self.assertEqual(len(self.test_holder.holder_information),1)
示例#3
0
 def setUp(self):
     self.test_holder = hp.Insured("John Smith","N/A","1994-01-01","111-12-1234",True,["Peanut Butter","Oxygen"],["Fever","Arrythmia"])
示例#4
0
 def test_add_loss(self):
     with self.assertRaises(AssertionError):
         self.test_db.add_loss("aaaaaaaaaaaaaa","2012-01-01","Indemnity",100,100)
     self.test_db.add_insured(hp.Insured("Tom Thompson","Male","1987-02-01","367-88-8888","no",[],[]))
     self.test_db.insureds.iloc[1,0] = "891e02a2-65f5-4ee6-918b-cfa64d7a2cac"
     self.assertEqual(len(self.test_db.add_loss("891e02a2-65f5-4ee6-918b-cfa64d7a2cac","2014-01-01","Medical",100,100)),1)
示例#5
0
 def setUp(self):
     self.test_holder = hp.Insured("John Smith","N/A","1994-01-01","111-12-1234",True,["Peanut Butter","Oxygen"],["Fever","Arrythmia"])
     self.new_insured = hp.Insured("Jane Doe","Female","2000-02-14","000-00-0001",False,["Oranges"],[])
     self.test_db = hp.DataBase(self.test_holder)