[GRASS-SVN] r38170 - grass-addons/vector/v.in.postgis
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 2 12:08:10 EDT 2009
Author: mathieug
Date: 2009-07-02 12:08:10 -0400 (Thu, 02 Jul 2009)
New Revision: 38170
Modified:
grass-addons/vector/v.in.postgis/v_in_postgis_tests.py
Log:
python implementation - unit test module - renamed module
Modified: grass-addons/vector/v.in.postgis/v_in_postgis_tests.py
===================================================================
--- grass-addons/vector/v.in.postgis/v_in_postgis_tests.py 2009-07-02 16:07:59 UTC (rev 38169)
+++ grass-addons/vector/v.in.postgis/v_in_postgis_tests.py 2009-07-02 16:08:10 UTC (rev 38170)
@@ -21,7 +21,7 @@
##see http://trac.osgeo.org/grass/browser/grass/trunk/lib/python
from grass import core as grass
##only needed to use debugger with Komodo IDE. See http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging
-from dbgp.client import brk
+#from dbgp.client import brk
##see http://pyunit.sourceforge.net/
import unittest
##see http://initd.org/pub/software/psycopg/
@@ -40,7 +40,7 @@
geometryField = None
geoparams = None
-class v_in_postgis_sqlquery_tests(unittest.TestCase):
+class v_in_postgis_tests(unittest.TestCase):
def setUp(self):
grass.run_command("db.connect", driver = 'pg', database = 'host=' + host + ",dbname=" + dbname)
@@ -261,9 +261,9 @@
importer = GrassPostGisImporter(options, flags)
module = __import__('v_in_postgis_tests')
host = 'localhost'
- dbname = 'yourdb'
- user = 'postgresuser'
- pwd = 'yourpwd'
+ dbname = 'serveur_donnees_meteo'
+ user = 'postgres'
+ pwd = 'rootnculture'
db = dbapi2.connect(host=host, database=dbname, user=user, password=pwd)
cursor = db.cursor()
testTableName = 'test_grass_import'
@@ -308,3 +308,4 @@
finally:
module.cleanUp()
sys.exit(0)
+
More information about the grass-commit
mailing list