mirror of
https://github.com/coleifer/peewee.git
synced 2026-05-06 07:56:41 -04:00
Manual cleanup and organization of db_tests w/new gap coverage.
Clean up some of the assertions, merge some tests.
This commit is contained in:
@@ -3562,7 +3562,7 @@ class Database(_callable_context_manager):
|
||||
return _BoundModelsContext(models, self, bind_refs, bind_backrefs)
|
||||
|
||||
def get_noop_select(self, ctx):
|
||||
return ctx.sql(Select().columns(SQL('0')).where(SQL('0')))
|
||||
return ctx.literal('SELECT 0 WHERE 0')
|
||||
|
||||
@property
|
||||
def Model(self):
|
||||
@@ -4335,7 +4335,7 @@ class PostgresqlDatabase(Database):
|
||||
return fn.to_timestamp(date_field)
|
||||
|
||||
def get_noop_select(self, ctx):
|
||||
return ctx.sql(Select().columns(SQL('0')).where(SQL('false')))
|
||||
return ctx.literal('SELECT 0 WHERE false')
|
||||
|
||||
def set_time_zone(self, timezone):
|
||||
self.execute_sql('set time zone \'%s\';' % timezone.replace("'", "''"))
|
||||
|
||||
+523
-538
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user