summaryrefslogtreecommitdiff
path: root/tests/test_connection.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into feature-expose-pgconnFederico Di Gregorio2018-11-071-42/+201
|\
| * Use class decorators to decorate all testsdecorators-funDaniele Varrazzo2018-10-301-4/+2
| | | | | | | | | | | | Test decorators changed so that they can be applied either to a method or to a class. Of course their double nature is implemented by a decorator.
| * Full flake8 3.5 cleanupDaniele Varrazzo2018-10-231-0/+1
| |
| * Merge branch 'connection-info'Daniele Varrazzo2018-10-151-42/+181
| |\
| | * Use the connection.info properties instead of the legacy methodsconnection-infoDaniele Varrazzo2018-10-131-37/+37
| | |
| | * Guard from some info functions not available in some libpq versionsDaniele Varrazzo2018-10-131-0/+11
| | |
| | * Added ConnectionInfo.parameter_status()Daniele Varrazzo2018-10-131-0/+15
| | |
| | * Added ConnectionInfo.ssl_attribute()Daniele Varrazzo2018-10-131-0/+15
| | |
| | * Added all the missing ConnectionInfo attributesDaniele Varrazzo2018-10-131-0/+28
| | |
| | * Added ConnectionInfo.error_messageDaniele Varrazzo2018-10-131-0/+12
| | |
| | * Added other members to the ConnectionInfo classDaniele Varrazzo2018-10-121-1/+26
| | | | | | | | | | | | | | | Starting deprecating softly some of the methods bloating the connection class.
| | * Added several ConnectionInfo attributesDaniele Varrazzo2018-10-121-0/+36
| | |
| | * Moving host attribute to a connection.info objectDaniele Varrazzo2018-10-111-6/+3
| | |
| * | Fixed refcount in connection's readonly and deferrable gettersfix-790Daniele Varrazzo2018-10-121-0/+8
| |/ | | | | | | Close #790
| * Added connection.hostMarco De Paoli2018-10-061-1/+14
| | | | | | | | Return the server host name of the current connect.
* | Added connection.get_native_connection()Federico Di Gregorio2018-10-071-0/+5
|/
* Better testing of encryption function with libpq < 10encrypt-password-fix-testsDaniele Varrazzo2018-08-171-53/+44
|
* Fixed refcount handling in encrypt_passwordDaniele Varrazzo2018-05-201-0/+11
| | | | | | Added tests to check bad types, which discovered the above problem: on type error we would have decref'd on exit something that was only borrowed (because we wouldn't have performed matching increfs).
* Fixed keywords support for encrypt_password and tests completedDaniele Varrazzo2018-05-201-2/+28
|
* Fixed code flow in encrypt_password()Daniele Varrazzo2018-05-201-14/+14
| | | | | | | | Fixed several shortcomings highlighted in #576 and not fixed as requested. Also fixed broken behaviour of ignoring the algorithm if the connection is missing.
* Merge branch 'master' into masterAshesh Vashi2018-05-081-9/+36
|\
| * Allow strings subclasses in ensure_bytesfix-679Daniele Varrazzo2018-02-211-0/+14
| | | | | | | | Fix #679
| * Silence warning on import failing a testDaniele Varrazzo2018-01-291-1/+5
| |
| * Fixed idempotence check changing connection characteristicsDaniele Varrazzo2018-01-111-0/+10
| |
| * Use relative imports throughout testsJon Dufresne2017-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests relied on Python2 relative import semantics. Python3 changed import semantics to always search sys.path by default. To import using a relative path it must have a leading dot. Forward compatible with newer Pythons. Works towards the goal of moving tests outside of the installed package. For more information, see PEP-328: https://www.python.org/dev/peps/pep-0328/
| * Remove unnecessary script_to_py3; make scripts compatible insteadJon Dufresne2017-12-011-2/+2
| | | | | | | | Part of the work towards moving tests out of the installed package.
| * Drop support for EOL Python 2.6Hugo2017-11-281-2/+1
| |
| * Use modern except syntax throughout projectJon Dufresne2017-11-201-2/+2
| | | | | | | | | | | | The syntax "except Exception, exc:" is deprecated. All Python versions supported by psycopg2 support the newer, modern syntax. Forward compatible with future Python versions.
* | Moving the encrypt_password method from the connection class to theAshesh Vashi2017-09-141-7/+10
| | | | | | | | | | psycopgmodule, and exported it from psycopg2.extensions as per review comments.
* | Merge remote-tracking branch 'psycopg2/master'Ashesh Vashi2017-09-111-0/+1
|\ \ | |/
| * Skipped a couple of test with unsupported postgres featuresDaniele Varrazzo2017-07-221-0/+1
| |
* | 'encrypt_password' raises 'psycopg2.NotSupportedErorr' exception forAshesh Vashi2017-07-171-10/+4
| | | | | | | | | | server version >= 10, when compiled using libpq version < 10, when no algorithm is specified.
* | When compiled with libpq version < 10, it raises ↵Ashesh Vashi2017-07-171-1/+1
| | | | | | | | 'psycopg2.NotSupportedError' (not, psycopg2.ProgrammingError).
* | Added support for preparing the encrypted password of a PostgreSQLAshesh Vashi2017-07-171-1/+55
|/ | | | | password using the libpq functions - 'PQencryptPasswordConn', and 'PQencryptPassword'.
* Ignore spurious output in test with Python debug buildDaniele Varrazzo2017-06-171-0/+3
|
* Don't force a valid return code for the testDaniele Varrazzo2017-06-151-1/+1
| | | | Windows returns 22, Linux returns 1
* Added test to reproduce bug #551Daniele Varrazzo2017-06-151-1/+57
|
* Obscure the password on url dsn tooDaniele Varrazzo2017-03-161-7/+4
| | | | | | Note that we don't leak anymore the password length. Fix #528
* Added tests to verify the password is obscuredDaniele Varrazzo2017-03-151-0/+40
| | | | The url test fails: see issue #528
* Bunch of test tweaks to make the test grid greenDaniele Varrazzo2017-03-141-10/+2
|
* Ignore None arguments passed to make_dsn()fix-517Daniele Varrazzo2017-03-011-0/+4
| | | | Close #517.
* Added readonly and deferrable attributesDaniele Varrazzo2017-02-161-15/+112
|
* Revert pre-2.7b1 behaviour of silent rollback on conn.set_isolation_level()Daniele Varrazzo2017-02-161-6/+26
| | | | Legacy method is legacy.
* connection.isolation_level is now writableDaniele Varrazzo2017-02-161-78/+179
|
* Merge branch 'no-set-default-session'Daniele Varrazzo2017-02-071-53/+54
|\
| * Set default_transaction_* GUC if session state is changed in autocomitDaniele Varrazzo2017-02-041-24/+25
| |
| * Exposing ISOLATION_LEVEL_DEFAULT to PythonDaniele Varrazzo2017-02-041-1/+1
| | | | | | | | | | This is now the state that is returned to Python if nothing has been explicitly set.
| * Test looking the transactions characteristics instead of the defaultDaniele Varrazzo2017-02-041-28/+28
| | | | | | | | | | | | So we test the effect, not the implementation. Tests pass on master too this way, three tests fail in this branch, related to autocommit (sort-of-obviously).
* | assertDsnEqual moved as TestSuite methodDaniele Varrazzo2017-02-061-5/+5
|/
* Merge branch 'async-keyword'Daniele Varrazzo2017-02-031-8/+5
|\ | | | | | | Close #495