diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-01-28 12:41:49 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-01-28 12:41:49 +0100 |
commit | 4466015d27af0a5424953eb7f1502994d73027cf (patch) | |
tree | 15284419dfa5fe384fe74bdeda03c45650a68b53 /test | |
parent | 9750da9cb7dc14309be38f98bc0b50c8bff9eb72 (diff) |
whitelist validation-non-resource-uris, minor fixes
Diffstat (limited to 'test')
-rwxr-xr-x | test/test_examples_util.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_examples_util.rb b/test/test_examples_util.rb index 02d5921..c465d94 100755 --- a/test/test_examples_util.rb +++ b/test/test_examples_util.rb @@ -66,12 +66,15 @@ module ValidationExamples end def self.validation_get(uri, accept_header='application/rdf+xml') + params = {} + params[:subjectid] = SUBJECTID if SUBJECTID if $test_case #puts "getting "+uri+","+accept_header - $test_case.get uri,nil,'HTTP_ACCEPT' => accept_header + $test_case.get uri,params,'HTTP_ACCEPT' => accept_header return wait($test_case.last_response.body) else - return OpenTox::RestClientWrapper.get(File.join(CONFIG[:services]["opentox-validation"],uri),{:accept => accept_header}) + params[:accept] = accept_header + return OpenTox::RestClientWrapper.get(File.join(CONFIG[:services]["opentox-validation"],uri),params) end end @@ -291,6 +294,7 @@ module ValidationExamples def report begin @report_uri = Util.validation_post '/report/'+report_type,{:validation_uris => @validation_uri} + Util.validation_get "/report/"+report_uri.split("/")[-2]+"/"+report_uri.split("/")[-1] rescue => ex puts "could not create report: "+ex.message raise ex |