Skip to content

Commit

Permalink
Start rewriting legacy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Oct 28, 2019
1 parent 51b32dd commit a42ebd3
Show file tree
Hide file tree
Showing 19 changed files with 2,073 additions and 1,791 deletions.
3 changes: 2 additions & 1 deletion ckan/model/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def after_rollback(self, session):

def engine_is_sqlite(sa_engine=None):
# Returns true iff the engine is connected to a sqlite database.
return (sa_engine or engine).url.drivername == 'sqlite'

return (sa_engine or engine).engine.url.drivername == 'sqlite'


def engine_is_pg(sa_engine=None):
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/legacy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
conf_dir = os.path.dirname(os.path.dirname(here_dir))

# Invoke websetup with the current config file
SetupCommand('setup-app').run([config['__file__']])
# SetupCommand('setup-app').run([config['__file__']])

# monkey patch paste.fixtures.TestRespose
# webtest (successor library) already has this
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/legacy/ckantestplugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ def preview_template(self, context, data_dict):

# importing this file loads all these extensions by default
# so clean up the extensions
p.plugins_update()
# p.plugins_update()
Loading

0 comments on commit a42ebd3

Please sign in to comment.