Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_file(file_name):
path = get_test_suite_path(
'responses',
'tohep',
file_name,
)
with open(path) as input_data:
data = yaml.load(input_data.read())
return data
def get_configuration():
package_location = get_test_suite_path(
'pos',
'fixtures',
'oai_harvested',
'pos_record.xml',
test_suite='functional',
)
return {
'CRAWLER_HOST_URL': 'http://scrapyd:6800',
'CRAWLER_PROJECT': 'hepcrawl',
'CRAWLER_ARGUMENTS': {
'source_file': 'file://' + package_location,
'base_conference_paper_url': (
'https://http-server.local/contribution?id='
),
'base_proceedings_url': (
def get_ftp_settings():
netrc_location = get_test_suite_path(
'desy',
'fixtures',
'ftp_server',
'.netrc',
test_suite='functional',
)
return {
'CRAWLER_HOST_URL': 'http://scrapyd:6800',
'CRAWLER_PROJECT': 'hepcrawl',
'CRAWLER_ARGUMENTS': {
'ftp_host': 'ftp_server',
'ftp_netrc': netrc_location,
}
def get_local_settings():
package_location = get_test_suite_path(
'desy',
'fixtures',
'ftp_server',
'DESY',
test_suite='functional',
)
return {
'CRAWLER_HOST_URL': 'http://scrapyd:6800',
'CRAWLER_PROJECT': 'hepcrawl',
'CRAWLER_ARGUMENTS': {
'source_folder': package_location,
}