Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_run_data_managers_installation_skipped(self, start_container): # noqa: F811 Prevent start_container unused warning.
container = start_container
with open("tests/run_data_managers.yaml.test") as config_file:
configuration = yaml.safe_load(config_file)
dm = DataManagers(container.gi, configuration)
install_results = dm.run()
assert (len(install_results.successful_jobs) == 0)
assert (len(install_results.skipped_jobs) == 9)
assert (len(install_results.failed_jobs) == 0)
{'dbkey_source|dbkey': 'INVALID'},
{'dbkey_source|dbkey_name': 'INVALID_KEY'},
{'sequence_name': 'INVALID'},
{'sequence_id': 'INVALID'},
{'reference_source|reference_source_selector': 'ncbi'},
{'reference_source|requested_identifier': 'INVALID0123'}
],
data_table_reload=[
"all_fasta",
"__dbkeys__"
]
)
]
)
dm = DataManagers(container.gi, configuration)
with pytest.raises(RuntimeError):
dm.run()
assert ("HTTP Error 404" in caplog.text)
assert ("Not all jobs successful! aborting..." in caplog.text)
assert ("finished with exit code: 1. Stderr: " in caplog.text)