Log Message: |
Prepare the test suite for tests with required authentication
* test/postgissupport.py (PostgreSQLServer.__init__): Add instance
variables with two predefined users/passwords, one for the admin
and one for a non-privileged user.
(PostgreSQLServer.createdb): Pass the admin name to initdb and add
the non-privileged user to the database and set the admin password
(PostgreSQLServer.wait_for_postmaster): Use the admin user name.
Better error reporting
(PostgreSQLServer.connection_params)
(PostgreSQLServer.connection_string): New methods to return
information about how to connect to the server
(PostgreSQLServer.execute_sql): New. Convenience method to execute
SQL statements
(PostgreSQLServer.require_authentication): Toggle whether the
server requires authentication
(PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
Add or alter users
(PostGISDatabase.initdb): Pass the admin name one the
subprocesses' command lines. Grant select rights on
geometry_columns to everybody.
(upload_shapefile): Use the admin name and password when
connecting. Grant select rights on the new table to everybody.
* test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
server's new methods to get the connection parameters.
* test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
(TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
server's new methods to get the connection parameters.
* test/test_postgis_db.py
(TestPostGISConnection.test_gis_tables_empty)
(TestPostGISConnection.test_gis_tables_non_empty)
(PostGISStaticTests.setUp): Use the server's new methods to get
the connection parameters.
|