MCPcopy
hub / github.com/celery/celery / test_setup_security

Method test_setup_security

t/unit/security/test_security.py:69–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 disable.assert_called_with(allowed=['foo'])
68
69 def test_setup_security(self):
70 with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_key1:
71 tmp_key1.write(KEY1)
72 with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_cert1:
73 tmp_cert1.write(CERT1)
74
75 self.app.conf.update(
76 task_serializer='auth',
77 accept_content=['auth'],
78 security_key=tmp_key1.name,
79 security_certificate=tmp_cert1.name,
80 security_cert_store='*.pem',
81 )
82 self.app.setup_security()
83
84 os.remove(tmp_key1.name)
85 os.remove(tmp_cert1.name)
86
87 def test_setup_security_encrypted_key_file(self):
88 with tempfile.NamedTemporaryFile(mode='w', delete=False) as tmp_key1:

Callers

nothing calls this directly

Calls 4

setup_securityMethod · 0.80
writeMethod · 0.45
updateMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected