Exemplo n.º 1
0
 def test_account_crud(self):
     base.execute("DELETE FROM accounts WHERE Code LIKE 'Test%'")
     data = {
         "code": "Testio",
         "type": "1",
         "donationtype": "1",
         "description": "Test"
     }
     post = utils.PostedData(data, "en")
     aid = financial.insert_account_from_form(base.get_dbo(), "test", post)
     data["accountid"] = aid
     financial.update_account_from_form(base.get_dbo(), "test", post)
     financial.delete_account(base.get_dbo(), "test", aid)
Exemplo n.º 2
0
 def test_account_crud(self):
     base.execute("DELETE FROM accounts WHERE Code LIKE 'Test%'")
     data = {
         "code": "Testio",
         "type": "1",
         "donationtype": "1",
         "description": "Test"
     }
     post = utils.PostedData(data, "en")
     aid = financial.insert_account_from_form(base.get_dbo(), "test", post)
     data["accountid"] = aid
     financial.update_account_from_form(base.get_dbo(), "test", post)
     financial.delete_account(base.get_dbo(), "test", aid)
Exemplo n.º 3
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)
Exemplo n.º 4
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)
Exemplo n.º 5
0
 def test_update_all_variable_animal_data(self):
     base.execute(
         "DELETE FROM configuration WHERE ItemName LIKE 'VariableAnimalDataUpdated'"
     )
     animal.update_all_variable_animal_data(base.get_dbo())
Exemplo n.º 6
0
 def tearDown(self):
     base.execute("DELETE FROM animal WHERE AnimalName = 'TestioCSV'")
Exemplo n.º 7
0
 def tearDown(self):
     base.execute("DELETE FROM animalcontrol WHERE ID = %d" % self.nid)
Exemplo n.º 8
0
 def tearDown(self):
     base.execute("DELETE FROM animalcontrol WHERE ID = %d" % self.nid)
Exemplo n.º 9
0
 def tearDown(self):
     base.execute("DELETE FROM stockusage WHERE StockLevelID = %d" %
                  self.nid)
     asm3.stock.delete_stocklevel(base.get_dbo(), "test", self.nid)
Exemplo n.º 10
0
 def tearDown(self):
     base.execute("DELETE FROM stockusage WHERE StockLevelID = %d" % self.nid)
     stock.delete_stocklevel(base.get_dbo(), "test", self.nid)
Exemplo n.º 11
0
 def tearDown(self):
     base.execute("DELETE FROM animal WHERE AnimalName = 'TestioCSV'")
Exemplo n.º 12
0
 def test_update_all_variable_animal_data(self):
     base.execute("DELETE FROM configuration WHERE ItemName LIKE 'VariableAnimalDataUpdated'")
     animal.update_all_variable_animal_data(base.get_dbo())