Esempio n. 1
0
 def test_transport_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "animal": "1",
         "driver": "1",
         "pickup": "1",
         "dropoff": "1",
         "pickupdate": base.today_display(),
         "dropoffdate": base.today_display(),
         "status": "1"
     }
     post = utils.PostedData(data, "en")
     tid = movement.insert_transport_from_form(base.get_dbo(), "test", post)
     post.data["transportid"] = str(tid)
     movement.update_transport_from_form(base.get_dbo(), "test", post)
     movement.delete_transport(base.get_dbo(), "test", tid)
     animal.delete_animal(base.get_dbo(), "test", aid)
 def test_transport_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = asm3.utils.PostedData(data, "en")
     aid, code = asm3.animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "animal": "1",
         "driver": "1",
         "pickup": "1",
         "dropoff": "1",
         "pickupdate": base.today_display(),
         "dropoffdate": base.today_display(),
         "status": "1"
     }
     post = asm3.utils.PostedData(data, "en")
     tid = asm3.movement.insert_transport_from_form(base.get_dbo(), "test", post)
     post.data["transportid"] = str(tid)
     asm3.movement.update_transport_from_form(base.get_dbo(), "test", post)
     asm3.movement.delete_transport(base.get_dbo(), "test", tid)
     asm3.animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 3
0
 def setUp(self):
     data = {
         "datelost": base.today_display(),
         "datereported": base.today_display(),
         "owner": "1",
         "species": "1", 
         "sex": "1",
         "breed": "1",
         "colour": "1",
         "markings": "Test",
         "arealost": "Test",
         "areapostcode": "Test"
     }
     post = utils.PostedData(data, "en")
     self.laid = lostfound.insert_lostanimal_from_form(base.get_dbo(), post, "test")
     data = {
         "datefound": base.today_display(),
         "datereported": base.today_display(),
         "owner": "1",
         "species": "1", 
         "sex": "1",
         "breed": "1",
         "colour": "1",
         "markings": "Test",
         "areafound": "Test",
         "areapostcode": "Test"
     }
     post = utils.PostedData(data, "en")
     self.faid = lostfound.insert_foundanimal_from_form(base.get_dbo(), post, "test")
Esempio n. 4
0
 def setUp(self):
     data = {
         "datelost": base.today_display(),
         "datereported": base.today_display(),
         "owner": "1",
         "species": "1", 
         "sex": "1",
         "breed": "1",
         "colour": "1",
         "markings": "Test",
         "arealost": "Test",
         "areapostcode": "Test"
     }
     post = utils.PostedData(data, "en")
     self.laid = lostfound.insert_lostanimal_from_form(base.get_dbo(), post, "test")
     data = {
         "datefound": base.today_display(),
         "datereported": base.today_display(),
         "owner": "1",
         "species": "1", 
         "sex": "1",
         "breed": "1",
         "colour": "1",
         "markings": "Test",
         "areafound": "Test",
         "areapostcode": "Test"
     }
     post = utils.PostedData(data, "en")
     self.faid = lostfound.insert_foundanimal_from_form(base.get_dbo(), post, "test")
Esempio n. 5
0
 def test_voucher_crud(self):
     data = {
         "personid": "1",
         "type": "1",
         "issued": base.today_display(),
         "expires": base.today_display(),
         "amount": "1000"
     }
     post = utils.PostedData(data, "en")
     vid = financial.insert_voucher_from_form(base.get_dbo(), "test", post)
     financial.update_voucher_from_form(base.get_dbo(), "test", post)
     financial.delete_voucher(base.get_dbo(), "test", vid)
Esempio n. 6
0
 def test_voucher_crud(self):
     data = {
         "personid": "1",
         "type": "1",
         "issued": base.today_display(),
         "expires": base.today_display(),
         "amount": "1000"
     }
     post = utils.PostedData(data, "en")
     vid = financial.insert_voucher_from_form(base.get_dbo(), "test", post)
     financial.update_voucher_from_form(base.get_dbo(), "test", post)
     financial.delete_voucher(base.get_dbo(), "test", vid)
Esempio n. 7
0
 def test_citation_crud(self):
     data = {
         "person": "1",
         "incident": "1",
         "type": "1",
         "citationdate": base.today_display(),
         "fineamount": "1000",
         "finedue": base.today_display()
     }
     post = utils.PostedData(data, "en")
     cid = financial.insert_citation_from_form(base.get_dbo(), "test", post)
     financial.update_citation_from_form(base.get_dbo(), "test", post)
     financial.delete_citation(base.get_dbo(), "test", cid)
Esempio n. 8
0
 def test_citation_crud(self):
     data = {
         "person": "1",
         "incident": "1",
         "type": "1",
         "citationdate": base.today_display(),
         "fineamount": "1000",
         "finedue": base.today_display()
     }
     post = utils.PostedData(data, "en")
     cid = financial.insert_citation_from_form(base.get_dbo(), "test", post)
     financial.update_citation_from_form(base.get_dbo(), "test", post)
     financial.delete_citation(base.get_dbo(), "test", cid)
Esempio n. 9
0
 def test_rota_crud(self):
     data = {
         "person": str(self.nid),
         "startdate": base.today_display(),
         "starttime": "00:00",
         "enddate": base.today_display(),
         "endtime": "00:00",
         "type": "1"
     }
     post = utils.PostedData(data, "en")
     rid = person.insert_rota_from_form(base.get_dbo(), "test", post)
     data["rotaid"] = str(rid)
     person.update_rota_from_form(base.get_dbo(), "test", post)
     person.delete_rota(base.get_dbo(), "test", rid)
Esempio n. 10
0
 def test_rota_crud(self):
     data = {
         "person": str(self.nid),
         "startdate": base.today_display(),
         "starttime": "00:00",
         "enddate": base.today_display(),
         "endtime": "00:00",
         "type": "1"
     }
     post = asm3.utils.PostedData(data, "en")
     rid = asm3.person.insert_rota_from_form(base.get_dbo(), "test", post)
     data["rotaid"] = str(rid)
     asm3.person.update_rota_from_form(base.get_dbo(), "test", post)
     asm3.person.delete_rota(base.get_dbo(), "test", rid)
Esempio n. 11
0
 def test_update_animal_from_form(self):
     data = {
         "id": self.nid,
         "datebroughtin": base.today_display(),
         "dateofbirth": base.today_display(),
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1",
         "sheltercode": "ICHANGED",
         "recordversion": "-1"
     }
     post = utils.PostedData(data, "en")
     animal.update_animal_from_form(base.get_dbo(), post, "test")
Esempio n. 12
0
 def test_update_animal_from_form(self):
     data = {
         "id": self.nid,
         "datebroughtin": base.today_display(),
         "dateofbirth": base.today_display(),
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1",
         "sheltercode": "ICHANGED",
         "recordversion": "-1"
     }
     post = utils.PostedData(data, "en")
     animal.update_animal_from_form(base.get_dbo(), post, "test")
Esempio n. 13
0
 def test_regimen_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "startdate": base.today_display(),
         "treatmentname": "Test",
         "dosage": "Test",
         "timingrule": "1",
         "timingrulenofrequencies": "1",
         "timingrulefrequency": "1",
         "totalnumberoftreatments": "1",
         "treatmentrule": "1",
         "singlemulti": "1"
     }
     post = utils.PostedData(data, "en")   
     mid = medical.insert_regimen_from_form(base.get_dbo(), "test", post)
     medical.update_regimen_from_form(base.get_dbo(), "test", post)
     medical.delete_regimen(base.get_dbo(), "test", mid)
     animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 14
0
 def test_regimen_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post,
                                                "test")
     data = {
         "startdate": base.today_display(),
         "treatmentname": "Test",
         "dosage": "Test",
         "timingrule": "1",
         "timingrulenofrequencies": "1",
         "timingrulefrequency": "1",
         "totalnumberoftreatments": "1",
         "treatmentrule": "1",
         "singlemulti": "1"
     }
     post = utils.PostedData(data, "en")
     mid = medical.insert_regimen_from_form(base.get_dbo(), "test", post)
     medical.update_regimen_from_form(base.get_dbo(), "test", post)
     medical.delete_regimen(base.get_dbo(), "test", mid)
     animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 15
0
 def test_licence_crud(self):
     base.execute("DELETE FROM ownerlicence WHERE LicenceNumber = 'LICENCE'")
     data = {
         "person": "1",
         "animal": "1",
         "type": "1",
         "number": "LICENCE",
         "fee": "1000",
         "issuedate": base.today_display(),
         "expirydate": base.today_display()
     }
     post = utils.PostedData(data, "en")
     lid = financial.insert_licence_from_form(base.get_dbo(), "test", post)
     data["licenceid"] = str(lid)
     financial.update_licence_from_form(base.get_dbo(), "test", post)
     financial.delete_licence(base.get_dbo(), "test", lid)
Esempio n. 16
0
 def test_update_diet_from_form(self):
     data = {
         "animalid": self.nid,
         "type": "1",
         "startdate": base.today_display()
     }
     post = utils.PostedData(data, "en")
     animal.update_diet_from_form(base.get_dbo(), "test", post)
Esempio n. 17
0
 def test_update_diet_from_form(self):
     data = {
         "animalid": self.nid,
         "type": "1",
         "startdate": base.today_display()
     }
     post = utils.PostedData(data, "en")
     animal.update_diet_from_form(base.get_dbo(), "test", post)
Esempio n. 18
0
 def test_licence_crud(self):
     base.execute(
         "DELETE FROM ownerlicence WHERE LicenceNumber = 'LICENCE'")
     data = {
         "person": "1",
         "animal": "1",
         "type": "1",
         "number": "LICENCE",
         "fee": "1000",
         "issuedate": base.today_display(),
         "expirydate": base.today_display()
     }
     post = utils.PostedData(data, "en")
     lid = financial.insert_licence_from_form(base.get_dbo(), "test", post)
     data["licenceid"] = str(lid)
     financial.update_licence_from_form(base.get_dbo(), "test", post)
     financial.delete_licence(base.get_dbo(), "test", lid)
Esempio n. 19
0
 def test_insert_diet_from_form(self):
     data = {
         "animalid": self.nid,
         "type": "1",
         "startdate": base.today_display()
     }
     post = asm3.utils.PostedData(data, "en")
     nid = asm3.animal.insert_diet_from_form(base.get_dbo(), "test", post)
     asm3.animal.delete_diet(base.get_dbo(), "test", nid)
Esempio n. 20
0
 def test_update_cost_from_form(self):
     data = {
         "animalid": self.nid,
         "type": "1",
         "costdate": base.today_display(),
         "cost": "2000"
     }
     post = asm3.utils.PostedData(data, "en")
     asm3.animal.update_cost_from_form(base.get_dbo(), "test", post)
Esempio n. 21
0
 def test_update_litter_from_form(self):
     data = {
         "animal": self.nid,
         "species": "1",
         "startdate": base.today_display(),
         "litterref": "RUBBISH"
     }
     post = utils.PostedData(data, "en")
     animal.update_litter_from_form(base.get_dbo(), "test", post)
Esempio n. 22
0
 def test_update_litter_from_form(self):
     data = {
         "animal": self.nid,
         "species": "1",
         "startdate": base.today_display(),
         "litterref": "RUBBISH"
     }
     post = utils.PostedData(data, "en")
     animal.update_litter_from_form(base.get_dbo(), "test", post)
Esempio n. 23
0
 def test_update_diary_from_form(self):
     data = {
         "diarydate":   base.today_display(),
         "diarytime":   "09:00",
         "diaryfor":    "user",
         "subject":     "Test",
         "note":        "TestNote"
     }
     post = utils.PostedData(data, "en")
     diary.update_diary_from_form(base.get_dbo(), "test", post)
Esempio n. 24
0
 def test_deduct_stocklevel_from_form(self):
     data = {
         "item": str(self.nid),
         "quantity": "1",
         "usagetype": "1",
         "usagedate": base.today_display(),
         "comments": "test"
     }
     post = utils.PostedData(data, "en")
     stock.deduct_stocklevel_from_form(base.get_dbo(), "test", post)
Esempio n. 25
0
 def test_insert_cost_from_form(self):
     data = {
         "animalid": self.nid,
         "type": "1",
         "costdate": base.today_display(),
         "cost": "2000"
     }
     post = utils.PostedData(data, "en")
     nid = animal.insert_cost_from_form(base.get_dbo(), "test", post)
     animal.delete_cost(base.get_dbo(), "test", nid)
Esempio n. 26
0
 def setUp(self):
     data = {
         "diarydate":   base.today_display(),
         "diarytime":   "09:00",
         "diaryfor":    "user",
         "subject":     "Test",
         "note":        "TestNote"
     }
     post = utils.PostedData(data, "en")
     self.nid = diary.insert_diary_from_form(base.get_dbo(), "test", 0, 0, post)
Esempio n. 27
0
 def test_update_diary_from_form(self):
     data = {
         "diarydate": base.today_display(),
         "diarytime": "09:00",
         "diaryfor": "user",
         "subject": "Test",
         "note": "TestNote"
     }
     post = asm3.utils.PostedData(data, "en")
     asm3.diary.update_diary_from_form(base.get_dbo(), "test", post)
Esempio n. 28
0
 def test_deduct_stocklevel_from_form(self):
     data = {
         "item": str(self.nid),
         "quantity": "1",
         "usagetype": "1",
         "usagedate": base.today_display(),
         "comments": "test"
     }
     post = asm3.utils.PostedData(data, "en")
     asm3.stock.deduct_stocklevel_from_form(base.get_dbo(), "test", post)
Esempio n. 29
0
 def test_insert_cost_from_form(self):
     data = {
         "animalid": self.nid,
         "type": "1",
         "costdate": base.today_display(),
         "cost": "2000"
     }
     post = utils.PostedData(data, "en")
     nid = animal.insert_cost_from_form(base.get_dbo(), "test", post)
     animal.delete_cost(base.get_dbo(), "test", nid)
Esempio n. 30
0
 def test_crud(self):
     data = {
         "logdate": base.today_display(),
         "type": "1",
         "entry": "Test entry"
     }
     post = utils.PostedData(data, "en")
     nid = log.insert_log_from_form(base.get_dbo(), "test", 0, 1, post)
     log.update_log_from_form(base.get_dbo(), "test", post)
     log.delete_log(base.get_dbo(), "test", nid)
Esempio n. 31
0
 def test_insert_litter_from_form(self):
     data = {
         "animal": self.nid,
         "species": "1",
         "startdate": base.today_display(),
         "litterref": "RUBBISH"
     }
     post = asm3.utils.PostedData(data, "en")
     nid = asm3.animal.insert_litter_from_form(base.get_dbo(), "test", post)
     asm3.animal.delete_litter(base.get_dbo(), "test", nid)
Esempio n. 32
0
 def test_investigation_crud(self):
     data = {
         "personid": str(self.nid),
         "date": base.today_display(),
         "notes": "Test"
     }
     post = utils.PostedData(data, "en")
     iid = person.insert_investigation_from_form(base.get_dbo(), "test", post)
     data["investigationid"] = str(iid)
     person.update_investigation_from_form(base.get_dbo(), "test", post)
     person.delete_investigation(base.get_dbo(), "test", iid)
Esempio n. 33
0
 def setUp(self):
     data = {
         "dateputon": base.today_display(),
         "description": "Test",
         "species": "1",
         "size": "1",
         "owner": "1",
         "urgency": "5"
     }
     post = utils.PostedData(data, "en")
     self.wlid = waitinglist.insert_waitinglist_from_form(base.get_dbo(), post, "test")
Esempio n. 34
0
 def test_investigation_crud(self):
     data = {
         "personid": str(self.nid),
         "date": base.today_display(),
         "notes": "Test"
     }
     post = utils.PostedData(data, "en")
     iid = person.insert_investigation_from_form(base.get_dbo(), "test", post)
     data["investigationid"] = str(iid)
     person.update_investigation_from_form(base.get_dbo(), "test", post)
     person.delete_investigation(base.get_dbo(), "test", iid)
Esempio n. 35
0
 def setUp(self):
     data = {
         "diarydate": base.today_display(),
         "diarytime": "09:00",
         "diaryfor": "user",
         "subject": "Test",
         "note": "TestNote"
     }
     post = asm3.utils.PostedData(data, "en")
     self.nid = asm3.diary.insert_diary_from_form(base.get_dbo(), "test", 0,
                                                  0, post)
 def setUp(self):
     data = {
         "dateputon": base.today_display(),
         "description": "Test",
         "species": "1",
         "size": "1",
         "owner": "1",
         "urgency": "5"
     }
     post = asm3.utils.PostedData(data, "en")
     self.wlid = asm3.waitinglist.insert_waitinglist_from_form(
         base.get_dbo(), post, "test")
Esempio n. 37
0
 def test_accounttrx_crud(self):
     data = {
         "trxdate": base.today_display(),
         "deposit": "1000",
         "withdrawal": "0",
         "accountid": "1",
         "otheraccount": "Income::Donation",
         "description": "Test"
     }
     post = asm3.utils.PostedData(data, "en")
     tid = asm3.financial.insert_trx_from_form(base.get_dbo(), "test", post)
     asm3.financial.update_trx_from_form(base.get_dbo(), "test", post)
     asm3.financial.delete_trx(base.get_dbo(), "test", tid)
Esempio n. 38
0
 def test_accounttrx_crud(self):
     data = {
         "trxdate": base.today_display(),
         "deposit": "1000",
         "withdrawal": "0",
         "accountid": "1",
         "otheraccount": "Income::Donation",
         "description": "Test"
     }
     post = utils.PostedData(data, "en")
     tid = financial.insert_trx_from_form(base.get_dbo(), "test", post)
     financial.update_trx_from_form(base.get_dbo(), "test", post)
     financial.delete_trx(base.get_dbo(), "test", tid)
Esempio n. 39
0
 def test_appointment_crud(self):
     data = {
         "animal": "2",
         "person": "2",
         "apptdate": base.today_display(),
         "appttime": "08:00:00",
         "status": "2",
     }
     post = utils.PostedData(data, "en")
     nid = clinic.insert_appointment_from_form(base.get_dbo(), "test", post)
     data["appointmentid"] = nid
     clinic.update_appointment_from_form(base.get_dbo(), "test", post)
     clinic.delete_appointment(base.get_dbo(), "test", nid)
Esempio n. 40
0
 def setUp(self):
     """ Creates a person and a received/due payment for them """
     self.paypal = asm3.paymentprocessor.paypal.PayPal(base.get_dbo())
     data = {
         "title": "Mr",
         "forenames": "Test",
         "surname": "Testing",
         "ownertype": "1",
         "address": "123 test street"
     }
     post = asm3.utils.PostedData(data, "en")
     self.personid = asm3.person.insert_person_from_form(base.get_dbo(),
                                                         post,
                                                         "test",
                                                         geocode=False)
     data = {
         "person": str(self.personid),
         "animal": "1",
         "type": "1",
         "payment": "1",
         "frequency": "0",
         "amount": "1000",
         "due": base.today_display()
     }
     post = asm3.utils.PostedData(data, "en")
     self.dueid = asm3.financial.insert_donation_from_form(
         base.get_dbo(), "test", post)
     data = {
         "person": "1",
         "animal": "1",
         "type": "1",
         "payment": "1",
         "frequency": "0",
         "amount": "1000",
         "received": base.today_display()
     }
     post = asm3.utils.PostedData(data, "en")
     self.recid = asm3.financial.insert_donation_from_form(
         base.get_dbo(), "test", post)
Esempio n. 41
0
 def test_receive_donation(self):
     data = {
         "person": "1",
         "animal": "1",
         "type": "1",
         "payment": "1",
         "frequency": "0",
         "amount": "1000",
         "due": base.today_display()
     }
     post = utils.PostedData(data, "en")
     did = financial.insert_donation_from_form(base.get_dbo(), "test", post)
     financial.update_donation_from_form(base.get_dbo(), "test", post)
     financial.receive_donation(base.get_dbo(), "test", did)
     financial.delete_donation(base.get_dbo(), "test", did)
Esempio n. 42
0
 def setUp(self):
     data = {
         "name": "Test Stock",
         "description": "Test Description",
         "location": "1",
         "unitname": "Tablet",
         "total": "50",
         "balance": "50",
         "expiry": "2014-01-01",
         "batchnumber": "00001",
         "usagetype": "1",
         "usagedate": base.today_display()
     }
     post = utils.PostedData(data, "en")
     self.nid = stock.insert_stocklevel_from_form(base.get_dbo(), post, "test")
Esempio n. 43
0
 def test_update_stocklevel_from_form(self):
     data = {
         "stocklevelid": str(self.nid),
         "name": "Test Stock",
         "description": "Test Description",
         "location": "1",
         "unitname": "Tablet",
         "total": "50",
         "balance": "50",
         "expiry": "2014-01-01",
         "batchnumber": "00001",
         "usagetype": "1",
         "usagedate": base.today_display()
     }
     post = asm3.utils.PostedData(data, "en")
     asm3.stock.update_stocklevel_from_form(base.get_dbo(), post, "test")
Esempio n. 44
0
 def setUp(self):
     data = {
         "animal": "1",
         "person": "1",
         "apptdate": base.today_display(),
         "appttime": "12:00:00",
         "status": "1",
     }
     post = utils.PostedData(data, "en")
     self.anid = clinic.insert_appointment_from_form(base.get_dbo(), "test", post)
     data = {
         "appointmentid": str(self.anid),
         "description": "foo",
         "amount": "50"
     }
     post = utils.PostedData(data, "en")
     self.inid = clinic.insert_invoice_from_form(base.get_dbo(), "test", post)
Esempio n. 45
0
 def test_vaccination_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "animal": str(aid),
         "required": base.today_display(),
         "type": "1"
     }
     post = utils.PostedData(data, "en")
     vid = medical.insert_vaccination_from_form(base.get_dbo(), "test", post)
     medical.update_vaccination_from_form(base.get_dbo(), "test", post)
     medical.delete_regimen(base.get_dbo(), "test", vid)
     animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 46
0
 def test_movement_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "animal": str(aid),
         "person": 1,
         "movementdate": base.today_display(),
         "type": "1",
     }
     post = utils.PostedData(data, "en")
     mid = movement.insert_movement_from_form(base.get_dbo(), "test", post)
     post.data["movementid"] = str(mid)
     movement.update_movement_from_form(base.get_dbo(), "test", post)
     movement.delete_movement(base.get_dbo(), "test", mid)
     animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 47
0
 def test_test_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "animal": str(aid),
         "required": base.today_display(),
         "type": "1",
         "result": "1"
     }
     post = utils.PostedData(data, "en")
     tid = medical.insert_test_from_form(base.get_dbo(), "test", post)
     post.data["testid"] = str(tid)
     medical.update_test_from_form(base.get_dbo(), "test", post)
     medical.delete_test(base.get_dbo(), "test", tid)
     animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 48
0
 def test_movement_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = asm3.utils.PostedData(data, "en")
     aid, code = asm3.animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "animal": str(aid),
         "person": 1,
         "movementdate": base.today_display(),
         "type": "1",
     }
     post = asm3.utils.PostedData(data, "en")
     mid = asm3.movement.insert_movement_from_form(base.get_dbo(), "test", post)
     post.data["movementid"] = str(mid)
     asm3.movement.update_movement_from_form(base.get_dbo(), "test", post)
     asm3.movement.delete_movement(base.get_dbo(), "test", mid)
     asm3.animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 49
0
 def test_vaccination_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post,
                                                "test")
     data = {
         "animal": str(aid),
         "required": base.today_display(),
         "type": "1"
     }
     post = utils.PostedData(data, "en")
     vid = medical.insert_vaccination_from_form(base.get_dbo(), "test",
                                                post)
     medical.update_vaccination_from_form(base.get_dbo(), "test", post)
     medical.delete_regimen(base.get_dbo(), "test", vid)
     animal.delete_animal(base.get_dbo(), "test", aid)
Esempio n. 50
0
 def test_test_crud(self):
     data = {
         "animalname": "Testio",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     aid, code = animal.insert_animal_from_form(base.get_dbo(), post,
                                                "test")
     data = {
         "animal": str(aid),
         "required": base.today_display(),
         "type": "1",
         "result": "1"
     }
     post = utils.PostedData(data, "en")
     tid = medical.insert_test_from_form(base.get_dbo(), "test", post)
     post.data["testid"] = str(tid)
     medical.update_test_from_form(base.get_dbo(), "test", post)
     medical.delete_test(base.get_dbo(), "test", tid)
     animal.delete_animal(base.get_dbo(), "test", aid)