def test_ssl(self): endpoint_main([ "--ssl_dh_param=keys/dhparam.pem", "--ssl_cert=keys/server.crt", "--ssl_key=keys/server.key", "--s3_bucket=none", ])
def test_gcm_start(self, fsi): fsi.choose_ID.return_value = "123" endpoint_main([ "--gcm_enabled", """--senderid_list={"123":{"auth":"abcd"}}""", "--s3_bucket=none", ])
def test_bad_client_certs(self): cert = self.TestArg._client_certs['partner1'][0] ssl_opts = ["--ssl_cert=keys/server.crt", "--ssl_key=keys/server.key"] eq_(endpoint_main(ssl_opts + ["--client_certs='[Invalid'"], False), 1) eq_( endpoint_main(ssl_opts + ['--client_certs={"": ["%s"]}' % cert], False), 1) eq_(endpoint_main(ssl_opts + ['--client_certs={"quux": [""]}'], False), 1) eq_( endpoint_main(ssl_opts + ['--client_certs={"foo": "%s"}' % cert], False), 1) eq_(endpoint_main(['--client_certs={"foo": ["%s"]}' % cert], False), 1)
def test_client_certs(self): cert = self.TestArg._client_certs['partner1'][0] returncode = endpoint_main([ "--ssl_cert=keys/server.crt", "--ssl_key=keys/server.key", '--client_certs={"foo": ["%s"]}' % cert ], False) ok_(not returncode)
def test_basic(self): endpoint_main([ "--s3_bucket=none", ])
def test_bad_senderidlist(self): endpoint_main(["--senderid_list='[Invalid'"])
def test_basic(self): endpoint_main([], False)
def test_memusage(self): endpoint_main([ "--memusage_port=8083", ], False)
def test_proxy_protocol_port(self): endpoint_main([ "--proxy_protocol_port=8081", ], False)
def test_bad_apnsconf(self): returncode = endpoint_main(["--apns_creds='[Invalid'"], False) ok_(returncode not in (None, 0))
def test_bad_senderidlist(self): returncode = endpoint_main( ["--gcm_enabled", "--senderid_list='[Invalid'"], False) ok_(returncode not in (None, 0))
def test_ssl(self): endpoint_main([ "--ssl_dh_param=keys/dhparam.pem", "--ssl_cert=keys/server.crt", "--ssl_key=keys/server.key", ], False)
def test_bad_senderidlist(self): endpoint_main([ "--senderid_list='[Invalid'" ])
def test_gcm_start(self): endpoint_main([ "--gcm_enabled", """--senderid_list={"123":{"auth":"abcd"}}""", ], False)
def test_basic(self): endpoint_main([])