Example #1
0
 def test_updates(self):
     asm3.clinic.update_appointment_to_waiting(base.get_dbo(), "test",
                                               self.anid, base.today())
     asm3.clinic.update_appointment_to_with_vet(base.get_dbo(), "test",
                                                self.anid, base.today())
     asm3.clinic.update_appointment_to_complete(base.get_dbo(), "test",
                                                self.anid, base.today())
Example #2
0
 def test_calendar_event_calls(self):
     medical.get_vaccinations_two_dates(base.get_dbo(), base.today(),
                                        base.today())
     medical.get_vaccinations_expiring_two_dates(base.get_dbo(),
                                                 base.today(), base.today())
     medical.get_tests_two_dates(base.get_dbo(), base.today(), base.today())
     medical.get_treatments_two_dates(base.get_dbo(), base.today(),
                                      base.today())
Example #3
0
 def test_execute_diary_task(self):
     data = {
         "animalname": "TestioDiary",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = asm3.utils.PostedData(data, "en")
     animalid, code = asm3.animal.insert_animal_from_form(
         base.get_dbo(), post, "test")
     data = {"name": "Test", "type": "0"}
     post = asm3.utils.PostedData(data, "en")
     headid = asm3.diary.insert_diarytaskhead_from_form(
         base.get_dbo(), "test", post)
     asm3.diary.update_diarytaskhead_from_form(base.get_dbo(), "test", post)
     data = {
         "taskid": str(headid),
         "daypivot": "1",
         "whofor": "user",
         "subject": "Testtask",
         "note": "Testtasknote"
     }
     post = asm3.utils.PostedData(data, "en")
     asm3.diary.insert_diarytaskdetail_from_form(base.get_dbo(), "test",
                                                 post)
     asm3.diary.update_diarytaskdetail_from_form(base.get_dbo(), "test",
                                                 post)
     asm3.diary.execute_diary_task(base.get_dbo(), "test",
                                   asm3.diary.ANIMAL, headid, animalid,
                                   base.today())
     asm3.diary.delete_diarytask(base.get_dbo(), "test", headid)
     asm3.animal.delete_animal(base.get_dbo(), "test", animalid)
Example #4
0
 def test_receive_donation(self):
     data = {
         "person": "1",
         "animal": "1",
         "type":   "1",
         "payment": "1",
         "frequency": "0",
         "amount": "1000",
         "due": base.today()
     }
     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)
 def test_get_transport_two_dates(self):
     asm3.movement.get_transport_two_dates(base.get_dbo(), base.today(), base.today())
Example #6
0
 def test_execute_diary_task(self):
     data = {
         "animalname": "TestioDiary",
         "estimatedage": "1",
         "animaltype": "1",
         "entryreason": "1",
         "species": "1"
     }
     post = utils.PostedData(data, "en")
     animalid, code = animal.insert_animal_from_form(base.get_dbo(), post, "test")
     data = {
         "name": "Test",
         "type": "0"
     }
     post = utils.PostedData(data, "en")
     headid = diary.insert_diarytaskhead_from_form(base.get_dbo(), "test", post)
     diary.update_diarytaskhead_from_form(base.get_dbo(), "test", post)
     data = {
         "taskid": str(headid),
         "daypivot": "1",
         "whofor":   "user",
         "subject":  "Testtask",
         "note":     "Testtasknote"
     }
     post = utils.PostedData(data, "en")
     diary.insert_diarytaskdetail_from_form(base.get_dbo(), "test", post)
     diary.update_diarytaskdetail_from_form(base.get_dbo(), "test", post)
     diary.execute_diary_task(base.get_dbo(), "test", diary.ANIMAL, headid, animalid, base.today())
     diary.delete_diarytask(base.get_dbo(), "test", headid)
     animal.delete_animal(base.get_dbo(), "test", animalid)
Example #7
0
 def test_get_animal_appointments_due(self):
     asm3.clinic.get_animal_appointments_due(base.get_dbo(), 1, base.today(), base.today() + datetime.timedelta(days=7))
Example #8
0
 def test_get_donations_due_two_dates(self):
     asm3.financial.get_donations_due_two_dates(base.get_dbo(),
                                                base.today(), base.today())
Example #9
0
 def test_get_balance_fromto_date(self):
     firstac = asm3.financial.get_accounts(base.get_dbo())[0]
     asm3.financial.get_balance_fromto_date(base.get_dbo(), firstac["ID"],
                                            base.today(), base.today())
Example #10
0
 def test_get_rota(self):
     person.get_rota(base.get_dbo(), base.today(), base.today())
Example #11
0
 def test_get_transactions(self):
     firstac = financial.get_accounts(base.get_dbo())[0]
     financial.get_transactions(base.get_dbo(), firstac["ID"], base.today(), base.today(), financial.BOTH)
Example #12
0
 def test_get_balance_fromto_date(self):
     firstac = financial.get_accounts(base.get_dbo())[0]
     financial.get_balance_fromto_date(base.get_dbo(), firstac["ID"], base.today(), base.today())
Example #13
0
 def test_giftaid_spreadsheet(self):
     financial.giftaid_spreadsheet(base.get_dbo(), "%s/../src/" % base.PATH, base.today(), base.today())
Example #14
0
 def test_get_rota(self):
     asm3.person.get_rota(base.get_dbo(), base.today(), base.today())
Example #15
0
 def test_get_between_two_dates(self):
     asm3.diary.get_between_two_dates(base.get_dbo(), "user", base.today(),
                                      base.today())
Example #16
0
 def test_get_followup_two_dates(self):
     animalcontrol.get_followup_two_dates(base.get_dbo(), base.today(), base.today())
Example #17
0
 def test_rediarise_diary_note(self):
     asm3.diary.rediarise_diary_note(base.get_dbo(), "user", self.nid,
                                     base.today())
Example #18
0
 def test_get_traploan_two_dates(self):
     animalcontrol.get_traploan_two_dates(base.get_dbo(), base.today(), base.today())
Example #19
0
 def test_giftaid_spreadsheet(self):
     asm3.financial.giftaid_spreadsheet(base.get_dbo(),
                                        "%s/../src/" % base.PATH,
                                        base.today(), base.today())
Example #20
0
 def test_clone_from_template(self):
     asm3.animal.clone_from_template(base.get_dbo(), "test", self.nid, base.today(), 1, 1)
Example #21
0
 def test_get_transactions(self):
     firstac = asm3.financial.get_accounts(base.get_dbo())[0]
     asm3.financial.get_transactions(base.get_dbo(), firstac["ID"],
                                     base.today(), base.today(),
                                     asm3.financial.BOTH)
Example #22
0
 def test_rediarise_diary_note(self):
     diary.rediarise_diary_note(base.get_dbo(), "user", self.nid, base.today())
Example #23
0
 def test_get_number(self):
     assert animal.get_number_animals_on_shelter(base.get_dbo(),
                                                 base.today(), 1) > 0
     animal.get_number_litters_on_shelter(base.get_dbo(), base.today())
     animal.get_number_animals_on_foster(base.get_dbo(), base.today(), 1)
Example #24
0
 def test_get_number(self):
     assert animal.get_number_animals_on_shelter(base.get_dbo(), base.today(), 1) > 0
     animal.get_number_litters_on_shelter(base.get_dbo(), base.today())
     animal.get_number_animals_on_foster(base.get_dbo(), base.today(), 1)