예제 #1
0
def test_check_key():
    pmid_key = s3_client.get_pmid_key('1001287') + '/abstract'
    assert s3_client.check_key(pmid_key)
    pmid_key = s3_client.get_pmid_key('000000') + '/abstract'
    assert not s3_client.check_key(pmid_key)
예제 #2
0
def test_filter_keys():
    pmid_key = s3_client.get_pmid_key('1001287')
    key_list = s3_client.filter_keys(pmid_key)
    assert len(key_list) == 4
예제 #3
0
def test_get_pmid_key():
    pmid = '12345'
    pmid_key = s3_client.get_pmid_key(pmid)
    assert pmid_key == s3_client.prefix + 'PMID12345'
    assert unicode_strs(pmid_key)
예제 #4
0
def test_filter_keys():
    pmid_key = s3_client.get_pmid_key('1001287')
    key_list = s3_client.filter_keys(pmid_key)
    assert len(key_list) == 4
예제 #5
0
def test_get_pmid_key():
    pmid = '12345'
    pmid_key = s3_client.get_pmid_key(pmid)
    assert pmid_key == s3_client.prefix + 'PMID12345'
    assert unicode_strs(pmid_key)
예제 #6
0
def test_check_key():
    pmid_key = s3_client.get_pmid_key('1001287') + '/abstract'
    assert s3_client.check_key(pmid_key)
    pmid_key = s3_client.get_pmid_key('000000') + '/abstract'
    assert not s3_client.check_key(pmid_key)