fix: failing test in doctype Exercise
This commit is contained in:
@@ -6,6 +6,7 @@ import unittest
|
|||||||
|
|
||||||
class TestExercise(unittest.TestCase):
|
class TestExercise(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
frappe.db.sql('delete from `tabLMS Batch Membership`')
|
||||||
frappe.db.sql('delete from `tabExercise Submission`')
|
frappe.db.sql('delete from `tabExercise Submission`')
|
||||||
frappe.db.sql('delete from `tabExercise`')
|
frappe.db.sql('delete from `tabExercise`')
|
||||||
frappe.db.sql('delete from `tabLMS Course`')
|
frappe.db.sql('delete from `tabLMS Course`')
|
||||||
@@ -19,6 +20,12 @@ class TestExercise(unittest.TestCase):
|
|||||||
"description": "Test Course"
|
"description": "Test Course"
|
||||||
})
|
})
|
||||||
course.insert()
|
course.insert()
|
||||||
|
member = frappe.get_doc({
|
||||||
|
"doctype": "LMS Batch Membership",
|
||||||
|
"course": course.name,
|
||||||
|
"member": frappe.session.user
|
||||||
|
})
|
||||||
|
member.insert()
|
||||||
e = frappe.get_doc({
|
e = frappe.get_doc({
|
||||||
"doctype": "Exercise",
|
"doctype": "Exercise",
|
||||||
"name": "test-problem",
|
"name": "test-problem",
|
||||||
|
|||||||
Reference in New Issue
Block a user