Exemplo n.º 1
0
    def testResetImageValidity(self):
        tm = TMSaveCache({}, conf_filename=self.conf_filename)

        assert 2 == tm._P12_VALIDITY
        assert 2 * 24 * 3600 == tm._IMAGE_VALIDITY

        tm._update_endroser_cert_and_image_validity_periods()

        assert self.IMAGE_VALIDITY_DAYS == tm._P12_VALIDITY
        assert self.IMAGE_VALIDITY_DAYS * 24 * 3600 == tm._IMAGE_VALIDITY