def METHOD_NAME(self):
    with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_key1:
        tmp_key1.write(KEY1)
    with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_cert1:
        tmp_cert1.write(CERT1)
    self.app.conf.update(
        task_serializer='auth',
        accept_content=['auth'],
        security_key=tmp_key1.name,
        security_certificate=tmp_cert1.name,
        security_cert_store='*.pem',
    )
    self.app.setup_security()
    os.remove(tmp_key1.name)
    os.remove(tmp_cert1.name)