示例#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)
示例#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)
示例#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)
示例#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)
示例#5
0
文件: test_animal.py 项目: tgage/asm3
 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())
示例#6
0
 def tearDown(self):
     base.execute("DELETE FROM animal WHERE AnimalName = 'TestioCSV'")
示例#7
0
 def tearDown(self):
     base.execute("DELETE FROM animalcontrol WHERE ID = %d" % self.nid)
示例#8
0
 def tearDown(self):
     base.execute("DELETE FROM animalcontrol WHERE ID = %d" % self.nid)
示例#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)
示例#10
0
文件: test_stock.py 项目: magul/asm3
 def tearDown(self):
     base.execute("DELETE FROM stockusage WHERE StockLevelID = %d" % self.nid)
     stock.delete_stocklevel(base.get_dbo(), "test", self.nid)
示例#11
0
 def tearDown(self):
     base.execute("DELETE FROM animal WHERE AnimalName = 'TestioCSV'")
示例#12
0
文件: test_animal.py 项目: magul/asm3
 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())