def test_get_globus_http_url(): pc = PilotClient() url = pc.get_globus_http_url('dataframe.dat', 'my_folder') purl = urlparse(url) assert purl.netloc == pc.ENDPOINT + '.e.globus.org' assert purl.scheme == 'https' assert 'my_folder' in purl.path assert pc.TESTING_DIR not in purl.path
def test_get_globus_http_url(mock_projects): pc = PilotClient() pc.project.current = 'foo-project' url = pc.get_globus_http_url('foo.txt') purl = urlparse(url) foo = MOCK_PROJECTS['foo-project'] assert purl.netloc == foo['endpoint'] + '.e.globus.org' assert purl.scheme == 'https' assert purl.path == '/foo_folder/foo.txt'
def test_get_test_globus_http_url(): pc = PilotClient() url = pc.get_globus_http_url('dataframe.dat', 'my_folder', test=True) purl = urlparse(url) assert pc.TESTING_DIR in purl.path