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)
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
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)