Skip to content

Commit

Permalink
Fix tests by adding constant for basic experiment load names
Browse files Browse the repository at this point in the history
  • Loading branch information
brianbolt committed Jun 4, 2024
1 parent 05dc420 commit 5cee640
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_acasclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@

ACAS_NODEAPI_BASE_URL = "http://localhost:3001"

BASIC_EXPERIMENT_LOAD_EXPERIMENT_NAME = "BLAH"
BASIC_EXPERIMENT_LOAD_EXPERIMENT_NAME = "EXPERIMENT_BLAH"
BASIC_EXPERIMENT_LOAD_PROTOCOL_NAME = "PROTOCOL_BLAH"
STEREO_CATEGORY="Unknown"
class Timeout:
def __init__(self, seconds=1, error_message='Timeout'):
Expand Down Expand Up @@ -2982,11 +2983,11 @@ def get_basic_experiment_load_file(tempdir, project_code=None, corp_name=None, f

# If protocol name is specified, replace the protocol name
if protocol_name is not None:
data_file_contents = data_file_contents.replace('PROTOCOL_BLAH', protocol_name)
data_file_contents = data_file_contents.replace(BASIC_EXPERIMENT_LOAD_PROTOCOL_NAME, protocol_name)

# If experiment name is specified, replace the experiment name
if experiment_name is not None:
data_file_contents = data_file_contents.replace('EXPERIMENT_BLAH', experiment_name)
data_file_contents = data_file_contents.replace(BASIC_EXPERIMENT_LOAD_EXPERIMENT_NAME, experiment_name)

# Write the data file to the temp dir
file_name = f'basic-experiment-{ str(uuid.uuid4())}.csv'
Expand Down Expand Up @@ -3100,7 +3101,7 @@ def test_002_get_lot_dependencies(self, experiment):
self.assertEqual(len(meta_lot_dependencies['linkedExperiments']), 1)
protocol = meta_lot_dependencies['linkedExperiments'][0]['protocol']
self.assertIn('code', protocol)
self.assertEqual(protocol['name'], 'PROTOCOL_BLAH')
self.assertEqual(protocol['name'], BASIC_EXPERIMENT_LOAD_PROTOCOL_NAME)

# Verify the analysis group information
self.assertEqual(len(meta_lot_dependencies['linkedExperiments']), 1)
Expand Down

0 comments on commit 5cee640

Please sign in to comment.