Hey guys, stack here with a UnitTest.
This how I am entering my python shell for debugging:
cd /frappe-bench
source venv/bin/activate
cd /apps/erpnext/erpnext/buying/doctype/supplier/
ipython
Now the following:
from frappe.test_runner import make_test_records
test_records = frappe.get_test_records('Supplier')
this fails with error:
305 except AttributeError:
--> 306 raise RuntimeError('no object bound to %s' % self.__name__)
307
308 @property
RuntimeError: no object bound to conf
which is totally correct as I am not inside app content manager.
Searching around bench --help
where is a command bench shell
but it seems not to work.
So, what is the way of opening a python shell inside apps.content.manager ? (I have priori experience with Flask , so if it helps, I search a way to have app.app_context() ).
I also see that frappe.conf
is <LocalProxy unbound>
, so probably I need to bound
?
Ty all, kickapoo