def test_tc000092(self): ret_org_list_before = org.list() org.delete("test002z") ret_org_list_after = org.list() assert ret_org_list_before == ret_org_list_after
def after_tc000001(self): yield org.delete(self.ret_add_org["_id"])
def test_tc000091(self, create_org): ret_org_id = create_org with allure.step("删除分部"): org.delete(ret_org_id) ret_list_org_after = org.list()[1:] assert ret_list_org_after == []
def init_org_data(init_no_org): with allure.step("初始化创建一个部门"): org_id = org.add(name="财务部", parent=org.get_parent())["_id"] yield org_id with allure.step("销毁删除所有部门"): org.delete(org_id)
def after_tc000001(self, init_no_org): yield with allure.step("删除创建的分部信息"): org.delete(self.ret_add_org["_id"])