Default MockHDA to direct match

And change conversion_destination to `(False, None, None)` if there
shouldn't be a match.
This commit is contained in:
mvdbeek
2020-10-16 18:20:26 +02:00
committed by Matthias Bernt
parent 908250b732
commit 3104a2ecfd
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -39,6 +39,7 @@ class DataToolParameterTestCase(BaseParameterTestCase):
assert field['options']['hda'][1]['name'] == "hda1"
hda2.extension = 'data'
hda2.conversion_destination = (False, None, None)
field = self._simple_field()
assert len(field['options']['hda']) == 1, field
assert field['options']['hda'][0]['name'] == "hda1"
@@ -190,7 +191,7 @@ class MockHistoryDatasetAssociation(object):
self.deleted = False
self.dataset = test_dataset
self.visible = True
self.conversion_destination = (False, None, None)
self.conversion_destination = (True, None, None)
self.extension = "txt"
self.dbkey = "hg19"
self.implicitly_converted_parent_datasets = False
+1
View File
@@ -23,6 +23,7 @@ class DatasetMatcherTestCase(TestCase, UsesApp):
# Datasets that don't match datatype are not valid.
self.mock_hda.visible = True
self.mock_hda.extension = 'data'
self.mock_hda.conversion_destination = (False, None, None)
assert not self.test_context.hda_match(self.mock_hda)
def test_valid_hda_direct_match(self):