def test_get_manifest_renews_expired_token(self): if not hasattr(model_cache, "empty_for_testing"): # don't continue testing if we can't empty the cache as it will certainly fail. return # by clearing the cache and proxy session we force the proxy to # re-authenticate against the upstream registry. model_cache.empty_for_testing() self.proxy._session.headers.pop("Authorization") try: self.proxy.get_manifest(image_ref=self.tag) except Exception as e: assert False, f"unexpected exception {e}"
def test_save_package_bad_release(self, newdb): model_cache.empty_for_testing() CnrTestModels.test_save_package_bad_release(self, newdb)
def test_save_package(self, newdb, package_b64blob): model_cache.empty_for_testing() CnrTestModels.test_save_package(self, newdb, package_b64blob)