예제 #1
0
 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",
     ])
예제 #2
0
 def test_gcm_start(self, fsi):
     fsi.choose_ID.return_value = "123"
     endpoint_main([
         "--gcm_enabled",
         """--senderid_list={"123":{"auth":"abcd"}}""",
         "--s3_bucket=none",
     ])
예제 #3
0
 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",
     ])
예제 #4
0
 def test_gcm_start(self, fsi):
     fsi.choose_ID.return_value = "123"
     endpoint_main([
         "--gcm_enabled",
         """--senderid_list={"123":{"auth":"abcd"}}""",
         "--s3_bucket=none",
     ])
예제 #5
0
 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)
예제 #6
0
 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)
예제 #7
0
 def test_basic(self):
     endpoint_main([
         "--s3_bucket=none",
     ])
예제 #8
0
 def test_bad_senderidlist(self):
     endpoint_main(["--senderid_list='[Invalid'"])
예제 #9
0
 def test_basic(self):
     endpoint_main([
         "--s3_bucket=none",
     ])
예제 #10
0
 def test_basic(self):
     endpoint_main([], False)
예제 #11
0
 def test_memusage(self):
     endpoint_main([
         "--memusage_port=8083",
     ], False)
예제 #12
0
 def test_proxy_protocol_port(self):
     endpoint_main([
         "--proxy_protocol_port=8081",
     ], False)
예제 #13
0
 def test_bad_apnsconf(self):
     returncode = endpoint_main(["--apns_creds='[Invalid'"], False)
     ok_(returncode not in (None, 0))
예제 #14
0
 def test_bad_senderidlist(self):
     returncode = endpoint_main(
         ["--gcm_enabled", "--senderid_list='[Invalid'"], False)
     ok_(returncode not in (None, 0))
예제 #15
0
 def test_ssl(self):
     endpoint_main([
         "--ssl_dh_param=keys/dhparam.pem",
         "--ssl_cert=keys/server.crt",
         "--ssl_key=keys/server.key",
     ], False)
예제 #16
0
 def test_bad_senderidlist(self):
     endpoint_main([
         "--senderid_list='[Invalid'"
     ])
예제 #17
0
 def test_gcm_start(self):
     endpoint_main([
         "--gcm_enabled",
         """--senderid_list={"123":{"auth":"abcd"}}""",
     ], False)
예제 #18
0
 def test_basic(self):
     endpoint_main([])