mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 02:14:48 +00:00
frappe/frappe#478, frappe tests pass, .txt renamed to .json
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
test_records = [
|
||||
[{"activity_type":"_Test Activity Type"}],
|
||||
[{"activity_type":"_Test Activity Type 1"}],
|
||||
[{"activity_type":"_Test Activity Type 2"}]
|
||||
]
|
||||
|
||||
import frappe
|
||||
test_records = frappe.get_test_records('Activity Type')
|
||||
@@ -1,11 +1,6 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
test_records = [[{
|
||||
"project_name": "_Test Project",
|
||||
"status": "Open"
|
||||
}],
|
||||
[{
|
||||
"project_name": "_Test Project 1",
|
||||
"status": "Open"
|
||||
}]]
|
||||
|
||||
import frappe
|
||||
test_records = frappe.get_test_records('Project')
|
||||
@@ -1,10 +1,8 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
test_records = [
|
||||
[{"subject": "_Test Task", "project":"_Test Project", "status":"Open"}],
|
||||
[{"subject": "_Test Task 1", "status":"Open"}],
|
||||
[{"subject": "_Test Task 2", "status":"Open"}]
|
||||
]
|
||||
|
||||
import frappe
|
||||
test_records = frappe.get_test_records('Task')
|
||||
|
||||
test_ignore = ["Customer"]
|
||||
@@ -11,13 +11,4 @@ class TestTimeLog(unittest.TestCase):
|
||||
ts = frappe.get_doc(frappe.copy_doc(test_records[0]))
|
||||
self.assertRaises(OverlapError, ts.insert)
|
||||
|
||||
test_records = [[{
|
||||
"doctype": "Time Log",
|
||||
"from_time": "2013-01-01 10:00:00.000000",
|
||||
"to_time": "2013-01-01 11:00:00.000000",
|
||||
"activity_type": "_Test Activity Type",
|
||||
"note": "_Test Note",
|
||||
"docstatus": 1
|
||||
}]]
|
||||
|
||||
test_ignore = ["Sales Invoice", "Time Log Batch"]
|
||||
test_records = frappe.get_test_records('Time Log')
|
||||
@@ -6,7 +6,7 @@ import frappe, unittest
|
||||
class TimeLogBatchTest(unittest.TestCase):
|
||||
def test_time_log_status(self):
|
||||
from erpnext.projects.doctype.time_log.test_time_log import test_records as time_log_records
|
||||
time_log = frappe.get_doc(copy=time_log_records[0])
|
||||
time_log = frappe.copy_doc(time_log_records[0])
|
||||
time_log.update({
|
||||
"from_time": "2013-01-02 10:00:00.000000",
|
||||
"to_time": "2013-01-02 11:00:00.000000",
|
||||
@@ -16,7 +16,7 @@ class TimeLogBatchTest(unittest.TestCase):
|
||||
time_log.submit()
|
||||
|
||||
self.assertEquals(frappe.db.get_value("Time Log", time_log.name, "status"), "Submitted")
|
||||
tlb = frappe.get_doc(copy=test_records[0])
|
||||
tlb = frappe.copy_doc(test_records[0])
|
||||
tlb.doclist[1].time_log = time_log.name
|
||||
tlb.insert()
|
||||
tlb.submit()
|
||||
@@ -25,15 +25,4 @@ class TimeLogBatchTest(unittest.TestCase):
|
||||
tlb.cancel()
|
||||
self.assertEquals(frappe.db.get_value("Time Log", time_log.name, "status"), "Submitted")
|
||||
|
||||
test_records = [[
|
||||
{
|
||||
"doctype": "Time Log Batch",
|
||||
"rate": "500"
|
||||
},
|
||||
{
|
||||
"doctype": "Time Log Batch Detail",
|
||||
"parenttype": "Time Log Batch",
|
||||
"parentfield": "time_log_batch_details",
|
||||
"time_log": "_T-Time Log-00001",
|
||||
}
|
||||
]]
|
||||
test_records = frappe.get_test_records('Time Log Batch')
|
||||
Reference in New Issue
Block a user