Coverage for appr/models/kv/blob_kv_base.py: 69%

# Coverage for appr/models/kv/blob_kv_base.py : 69%

## 13 statements 9 run 4 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | from __future__ import absolute_import, division, print_function from appr.models.blob_base import BlobBase from appr.models.kv.models_index_base import ModelsIndexBase class BlobKvBase(BlobBase): index_class = ModelsIndexBase @property def index(self): return self.index_class(self.package) @classmethod def _fetch_b64blob(cls, package_name, digest): return cls.index_class(package_name).get_blob(digest) def save(self, content_media_type): return self.index.add_blob(self.b64blob, self.digest) @classmethod def delete(cls, package_name, digest): return cls.index_class(package_name).delete_blob(digest)