'Test automatic batch selection for outgoing items'

def test_delivery_note_fail(self):

    receipt = self.test_purchase_receipt(100)
    delivery_note = frappe.get_doc(dict(doctype=u'Delivery    Note', customer=u'_Test    Customer', company=receipt.company, items=[dict(item_code=u'ITEM-BATCH-1', qty=5000, rate=10, warehouse=receipt.items[0].warehouse)]))
    self.assertRaises(UnableToSelectBatchError, delivery_note.insert)
