From 89c8698169455ec0bca938ece692da9d60ac87d8 Mon Sep 17 00:00:00 2001 From: Carl Eberhard Date: Wed, 21 Aug 2013 10:00:09 -0700 Subject: [PATCH] Functional tests: fix sqlite db_path var; fix api test for hda update with nonsense key --- scripts/functional_tests.py | 2 +- test/casperjs/api-hda-tests.js | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/scripts/functional_tests.py b/scripts/functional_tests.py index c4cc4886865..fa783b50598 100644 --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -243,7 +243,7 @@ def main(): if 'GALAXY_TEST_DBURI' in os.environ: database_connection = os.environ['GALAXY_TEST_DBURI'] else: - database_connection = 'sqlite:///' + os.path.join( db_path, 'universe.sqlite' ) + database_connection = 'sqlite:///' + os.path.join( galaxy_db_path, 'universe.sqlite' ) kwargs = {} for dir in file_path, new_file_path: try: diff --git a/test/casperjs/api-hda-tests.js b/test/casperjs/api-hda-tests.js index cc9c26a047b..5a4ce42530d 100644 --- a/test/casperjs/api-hda-tests.js +++ b/test/casperjs/api-hda-tests.js @@ -135,18 +135,11 @@ spaceghost.historypanel.waitForHdas().then( function(){ }); this.test.assert( countKeys( returned ) === 0, "No changed returned: " + this.jsonStr( returned ) ); - this.test.comment( 'updating using a nonsense key should fail with an error' ); - var err = {}; - try { - returned = this.api.hdas.update( lastHistory.id, firstHda.id, { - konamiCode : 'uuddlrlrba' - }); - } catch( error ){ - err = error; - //this.debug( this.jsonStr( err ) ); - } - this.test.assert( !!err.message, "Error occurred: " + err.message ); - this.test.assert( err.status === 400, "Error status is 400: " + err.status ); + this.test.comment( 'updating using a nonsense key should NOT fail with an error' ); + returned = this.api.hdas.update( lastHistory.id, firstHda.id, { + konamiCode : 'uuddlrlrba' + }); + this.test.assert( countKeys( returned ) === 0, "No changed returned: " + this.jsonStr( returned ) ); this.test.comment( 'updating by attempting to change type should cause an error' ); err = {};