[open-ils-commits] r8370 -
branches/acq-experiment/Open-ILS/src/support-scripts/test-scripts
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 9 15:34:17 EST 2008
Author: erickson
Date: 2008-01-09 15:09:42 -0500 (Wed, 09 Jan 2008)
New Revision: 8370
Modified:
branches/acq-experiment/Open-ILS/src/support-scripts/test-scripts/acq_fund.py
Log:
added some comments
Modified: branches/acq-experiment/Open-ILS/src/support-scripts/test-scripts/acq_fund.py
===================================================================
--- branches/acq-experiment/Open-ILS/src/support-scripts/test-scripts/acq_fund.py 2008-01-09 19:59:51 UTC (rev 8369)
+++ branches/acq-experiment/Open-ILS/src/support-scripts/test-scripts/acq_fund.py 2008-01-09 20:09:42 UTC (rev 8370)
@@ -3,14 +3,18 @@
import oils.system, oils.utils.utils
import osrf.net_obj, osrf.ses
+# ---------------------------------------------------------------
+# Usage: python acq_fund.py <user> <password> <workstation>
+# ---------------------------------------------------------------
+
oils.system.oilsConnect('/openils/conf/opensrf_core.xml', 'config.opensrf')
auth_info = oils.utils.utils.login(sys.argv[1], sys.argv[2], 'staff', sys.argv[3])
authtoken = auth_info['payload']['authtoken']
ses = osrf.ses.ClientSession('open-ils.acq')
-ses.connect()
+ses.connect() # not required, but faster for batches of request
-# XXX This loop assumes the existence of orgs with IDs 1-6
+# XXX This loop assumes the existence of orgs with IDs 1-6 and a USD currency
ids = []
for i in range(0,5):
fund = osrf.net_obj.NetworkObject.acqfund()
@@ -32,6 +36,6 @@
print 'delete returned ' + str(req.recv().content())
-ses.disconnect()
+ses.disconnect() # only required if a connect() call was made
More information about the open-ils-commits
mailing list