示例#1
0
    def test_basic(self):
        cache = ResourceCache(directory='/tmp')
        cache.clear()
        assert cache.is_empty()

        entry = cache.get('http://downloads.anchore.s3-website-us-west-2.amazonaws.com/')
        print entry
        assert entry['content'] is not None

        print cache.metadata
        cache.clear()
示例#2
0
    def test_basic(self):
        cache = ResourceCache(directory='/tmp')
        cache.clear()
        assert cache.is_empty()

        entry = cache.get(
            'http://downloads.anchore.s3-website-us-west-2.amazonaws.com/')
        print entry
        assert entry['content'] is not None

        print cache.metadata
        cache.clear()
示例#3
0
    def test_basic(self):
        cache = ResourceCache(directory='/tmp')
        cache.clear()
        assert cache.is_empty()

        entry = cache.get('http://downloads.anchore.s3-website-us-west-2.amazonaws.com/')
        print entry
        assert entry['content'] is not None

        entry = cache.get('s3://downloads.anchore/readme.txt')
        print entry
        assert entry['content'] is not None

        entry = cache.get('s3://anchore-sync-service/subscriptions/engine.json')
        print entry
        assert entry['content'] is not None

        print cache.metadata
        cache.clear()