lint fixes for /test/api/

This commit is contained in:
Bjoern Gruening
2015-07-05 19:50:48 +01:00
committed by Nicola Soranzo
parent ad8175928d
commit eced982622
6 changed files with 9 additions and 11 deletions
+2 -2
View File
@@ -104,10 +104,10 @@ class DatasetCollectionApiTestCase( api.ApiTestCase ):
collection_type="paired",
)
create_response = self._post( "dataset_collections", payload )
self._post( "dataset_collections", payload )
# TODO: re-enable once there is a way to restrict access
# to this dataset via the API.
#self._assert_status_code_is( create_response, 403 )
# self._assert_status_code_is( create_response, 403 )
def test_enforces_unique_names( self ):
element_identifiers = self.dataset_collection_populator.list_identifiers( self.history_id )
+3 -2
View File
@@ -3,6 +3,7 @@ import textwrap
from base import api
from .helpers import TestsDatasets
class DatasetsApiTestCase( api.ApiTestCase, TestsDatasets ):
def setUp( self ):
@@ -37,5 +38,5 @@ class DatasetsApiTestCase( api.ApiTestCase, TestsDatasets ):
'raw' : 'True'
})
self._assert_status_code_is( display_response, 200 )
#TODO: doesn't work
#assert display_response.text == contents
# TODO: doesn't work
# assert display_response.text == contents
+1 -1
View File
@@ -95,4 +95,4 @@ class HistoriesApiTestCase( api.ApiTestCase ):
download_path = response[ "download_url" ]
return download_path
#TODO: (CE) test_create_from_copy
# TODO: (CE) test_create_from_copy
-2
View File
@@ -4,9 +4,7 @@ from json import dumps, loads
import operator
from .helpers import skip_without_tool
from .helpers import wait_on_state
from .test_workflows import BaseWorkflowsApiTestCase
import yaml
class WorkflowExtractionApiTestCase( BaseWorkflowsApiTestCase ):
-2
View File
@@ -1,5 +1,3 @@
from .helpers import wait_on_state
from base import api
from json import dumps
from collections import namedtuple
+3 -2
View File
@@ -15,6 +15,7 @@ STEP_TYPE_ALIASES = {
'input_collection': 'data_collection_input',
}
def yaml_to_workflow(has_yaml):
as_python = yaml.load(has_yaml)
return python_to_workflow(as_python)
@@ -84,7 +85,7 @@ def transform_input(context, step, default_name):
__ensure_inputs_connections(step)
if not "inputs" in step:
if "inputs" not in step:
step["inputs"] = [{}]
step_inputs = step["inputs"][0]
@@ -114,7 +115,7 @@ def transform_pause(context, step, default_name="Pause for dataset review"):
__ensure_inputs_connections(step)
if not "inputs" in step:
if "inputs" not in step:
step["inputs"] = [{}]
step_inputs = step["inputs"][0]