Fixes for travis (#12161)
* Fixes for travis * Testcase fixes for get_item_details * Testcase fixes for get_item_details * Travis fixes * Travis fixes
This commit is contained in:
parent
f06c281964
commit
123759aff7
@ -94,6 +94,7 @@ class TestPaymentEntry(unittest.TestCase):
|
||||
pe.reference_no = "1"
|
||||
pe.reference_date = "2016-01-01"
|
||||
pe.source_exchange_rate = 1
|
||||
pe.paid_to = payable
|
||||
pe.insert()
|
||||
pe.submit()
|
||||
|
||||
|
@ -27,6 +27,7 @@ class TestPurchaseInvoice(unittest.TestCase):
|
||||
unlink_payment_on_cancel_of_invoice(0)
|
||||
|
||||
def test_gl_entries_without_perpetual_inventory(self):
|
||||
frappe.db.set_value("Company", "_Test Company", "round_off_account", "Round Off - _TC")
|
||||
wrapper = frappe.copy_doc(test_records[0])
|
||||
set_perpetual_inventory(0, wrapper.company)
|
||||
self.assertTrue(not cint(erpnext.is_perpetual_inventory_enabled(wrapper.company)))
|
||||
|
@ -129,7 +129,6 @@ def _make_customer(source_name, target_doc=None, ignore_permissions=False):
|
||||
}
|
||||
}}, target_doc, set_missing_values, ignore_permissions=ignore_permissions)
|
||||
|
||||
print(doclist)
|
||||
return doclist
|
||||
|
||||
@frappe.whitelist()
|
||||
|
@ -5,13 +5,14 @@ from __future__ import unicode_literals
|
||||
import unittest
|
||||
import frappe
|
||||
|
||||
from frappe.test_runner import make_test_records
|
||||
from frappe.test_runner import make_test_objects
|
||||
from erpnext.controllers.item_variant import (create_variant, ItemVariantExistsError,
|
||||
InvalidItemAttributeValueError, get_variant)
|
||||
from erpnext.stock.doctype.item.item import StockExistsForTemplate
|
||||
|
||||
from frappe.model.rename_doc import rename_doc
|
||||
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
|
||||
from erpnext.stock.get_item_details import get_item_details
|
||||
|
||||
test_ignore = ["BOM"]
|
||||
test_dependencies = ["Warehouse"]
|
||||
@ -53,7 +54,9 @@ class TestItem(unittest.TestCase):
|
||||
return item
|
||||
|
||||
def test_get_item_details(self):
|
||||
from erpnext.stock.get_item_details import get_item_details
|
||||
# delete modified item price record and make as per test_records
|
||||
frappe.db.sql("""delete from `tabItem Price`""")
|
||||
|
||||
to_check = {
|
||||
"item_code": "_Test Item",
|
||||
"item_name": "_Test Item",
|
||||
@ -76,7 +79,8 @@ class TestItem(unittest.TestCase):
|
||||
"conversion_factor": 1.0,
|
||||
}
|
||||
|
||||
make_test_records("Item Price")
|
||||
make_test_objects("Item Price")
|
||||
print(frappe.get_all("Item Price"))
|
||||
|
||||
details = get_item_details({
|
||||
"item_code": "_Test Item",
|
||||
@ -88,7 +92,10 @@ class TestItem(unittest.TestCase):
|
||||
"price_list_currency": "_Test Currency",
|
||||
"plc_conversion_rate": 1,
|
||||
"order_type": "Sales",
|
||||
"customer": "_Test Customer"
|
||||
"customer": "_Test Customer",
|
||||
"conversion_factor": 1,
|
||||
"price_list_uom_dependant": 1,
|
||||
"ignore_pricing_rule": 1
|
||||
})
|
||||
|
||||
for key, value in to_check.iteritems():
|
||||
|
Loading…
Reference in New Issue
Block a user