-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Handle of Composed object from psycopg2 #1040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1040 +/- ##
==========================================
+ Coverage 84.29% 84.33% +0.04%
==========================================
Files 24 24
Lines 1318 1296 -22
Branches 178 176 -2
==========================================
- Hits 1111 1093 -18
+ Misses 157 155 -2
+ Partials 50 48 -2
Continue to review full report at Codecov.
|
Would it be possible to add a test? |
@stephane can you add a test? |
Added but now running tests requires a PostgreSQL server. |
@aaugustin any ideas how to support this? |
Provide a separate settings file that uses PostgreSQL and skip the test if not running with PostgreSQL. There are examples of doing this in Django itself. |
One job per build runs on PostgreSQL now: 57053f7 There is already one test in the testsuite which only runs on PostgreSQL: https://github.com/jazzband/django-debug-toolbar/blob/e11a40259fece146ffb840557ddc03ae263f35f1/tests/panels/test_sql.py#L140 |
Fix for: 'is_select': sql.lower().strip().startswith('select'), AttributeError: 'Composed' object has no attribute 'lower' http://initd.org/psycopg/docs/sql.html#psycopg2.sql.Composed
- add dependency on psycopg2 - requires PostgreSQL server
http://initd.org/psycopg/docs/sql.html#psycopg2.sql.Composed