Skip to content

Commit

Permalink
Attempt to get postgres view introspection test passing again.
Browse files Browse the repository at this point in the history
Must be a change in the latest pg version sql returned.
  • Loading branch information
coleifer committed Sep 18, 2023
1 parent ae8d2c7 commit ade292f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/db_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ def normalize_view_meta(view_meta):
return view_meta.name, (sql_ws_norm
.replace('`peewee_test`.', '')
.replace('`notes`.', '')
.replace('notes.', '')
.replace('`', ''))

def assertViews(expected):
Expand Down Expand Up @@ -637,11 +638,11 @@ def assertViews(expected):
elif IS_POSTGRESQL:
assertViews([
('notes_deleted',
('SELECT notes.content FROM notes '
'WHERE (notes.status = 9) ORDER BY notes.id DESC')),
('SELECT content FROM notes '
'WHERE (status = 9) ORDER BY id DESC')),
('notes_public',
('SELECT notes.content, notes.ts FROM notes '
'WHERE (notes.status = 1) ORDER BY notes.ts DESC'))])
('SELECT content, ts FROM notes '
'WHERE (status = 1) ORDER BY ts DESC'))])
elif IS_CRDB:
assertViews([
('notes_deleted',
Expand Down

0 comments on commit ade292f

Please sign in to comment.