Testcase fixes (#11238)

* Restaurant test records fixed

* Fixes for test cases
This commit is contained in:
Nabin Hait 2017-10-18 10:52:48 +05:30 committed by GitHub
parent 44734049f5
commit a9feddbb79
4 changed files with 4 additions and 8 deletions

View File

@ -12,9 +12,6 @@ data = {
'HR',
'ToDo'
],
'properties': [
{'doctype': 'Item', 'fieldname': 'is_stock_item', 'property': 'default', 'value': 0},
],
'set_value': [
['Stock Settings', None, 'show_barcode_field', 0]
],

View File

@ -8,9 +8,9 @@ import unittest
test_records = [
dict(doctype='Restaurant', name='Test Restaurant 1', company='_Test Company 1',
invoice_series_prefix='Test-Rest-1-Inv-', defaut_customer='_Test Customer 1'),
invoice_series_prefix='Test-Rest-1-Inv-', default_customer='_Test Customer 1'),
dict(doctype='Restaurant', name='Test Restaurant 2', company='_Test Company 1',
invoice_series_prefix='Test-Rest-2-Inv-', defaut_customer='_Test Customer 1'),
invoice_series_prefix='Test-Rest-2-Inv-', default_customer='_Test Customer 1'),
]
class TestRestaurant(unittest.TestCase):

View File

@ -558,5 +558,5 @@ class TestMaterialRequest(unittest.TestCase):
item_code= %s and warehouse= %s """, (mr.items[0].item_code, mr.items[0].warehouse))[0][0]
self.assertEquals(requested_qty, new_requested_qty)
test_dependencies = ["Currency Exchange"]
test_dependencies = ["Currency Exchange", "BOM"]
test_records = frappe.get_test_records('Material Request')

View File

@ -121,8 +121,7 @@ def create_material_request(material_requests):
mr.update({
"company": company,
"transaction_date": nowdate(),
"material_request_type": "Material Transfer" if request_type=="Transfer" else request_type,
"schedule_date": add_days(nowdate(), cint(items[0].lead_time_days))
"material_request_type": "Material Transfer" if request_type=="Transfer" else request_type
})
for d in items: