aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json8
-rw-r--r--test/lib/mapping.rb14
-rw-r--r--wqflask/wqflask/views.py2
3 files changed, 15 insertions, 9 deletions
diff --git a/test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json b/test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json
index 027e4d82..9744e7b2 100644
--- a/test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json
+++ b/test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json
@@ -1,6 +1,8 @@
-{ "maf" : "0.01",
- "control_marker" : "mCV24506226",
- "dataset" : "HC_M2_0606_P",
+{
+ "temp_uuid" : "unknown",
+"maf" : "0.01",
+"control_marker" : "mCV24506226",
+"dataset" : "HC_M2_0606_P",
"do_control" : "false",
"maf" : "0.01",
"manhattan_plot" : "False",
diff --git a/test/lib/mapping.rb b/test/lib/mapping.rb
index da580185..2678b127 100644
--- a/test/lib/mapping.rb
+++ b/test/lib/mapping.rb
@@ -5,16 +5,20 @@ end
describe MappingTest do
before do
- @agent = Mechanize.new
- @agent.agent.http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
end
describe MappingTest do
it "pyLMM mapping tool selection" do
- url = $host+'/marker_regression?trait_id=1435395_s_at&dataset=HC_M2_0606_P'
- page = @agent.post(url)
+ url = $host+'/marker_regression' # ?trait_id=1435395_s_at&dataset=HC_M2_0606_P'
+ @agent = Mechanize.new
+ @agent.agent.http.ca_file = '/etc/ssl/certs/ca-certificates.crt'
+ # @agent.idle_timeout = 0.01
+
json = JSON::load(File.read('test/data/input/mapping/1435395_s_at_HC_M2_0606_P.json'))
- p json
+ # p json
+ page = @agent.post(URI.encode(url),
+ json,
+ ({'Content-Type' => 'application/x-www-form-urlencoded'}))
p page
# get the form
# form = @agent.page.form_with(:name => "my-form")
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index b747654a..7061e0f1 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -395,6 +395,7 @@ def mapping_results_container_page():
@app.route("/marker_regression", methods=('POST',))
def marker_regression_page():
initial_start_vars = request.form
+ logger.debug("Marker regression called with initial_start_vars:", initial_start_vars.items())
temp_uuid = initial_start_vars['temp_uuid']
wanted = (
'trait_id',
@@ -432,7 +433,6 @@ def marker_regression_page():
'mapmethod_rqtl_geno',
'mapmodel_rqtl_geno'
)
- logger.debug("Marker regression called with initial_start_vars:", initial_start_vars)
start_vars = {}
for key, value in initial_start_vars.iteritems():
if key in wanted or key.startswith(('value:')):