示例#1
0
文件: test_surely.py 项目: ctb/surely
def test_simple_file():
    _, filename = get_temp_filename('foo.txt', tempdir='/tmp')

    fp = open(filename, 'w')
    fp.write('foo')
    fp.close()

    url = urlparse.urlunparse(('file', '', filename, '', '', ''))
    gotfile = surely.acquire(filename)
    assert filename == gotfile, (filename, gotfile)
示例#2
0
文件: test_surely.py 项目: ctb/surely
def test_simple_http():
    gotfile = surely.acquire('http://localhost/~t/ged/') # laptop

    data = open(gotfile).read()
    assert 'Lab of Genomics, Evolution, and Development' in data