Ejemplo n.º 1
0
def test_get_endpoint():
    # Test default endpoint with ssl
    c = Configuration()
    c.use_ssl = True
    assert(c.get_endpoint() == "https://notify.bugsnag.com")

    # Test default endpoint without ssl
    c = Configuration()
    c.use_ssl = False
    assert(c.get_endpoint() == "http://notify.bugsnag.com")

    # Test custom endpoint
    c = Configuration()
    c.use_ssl = False
    c.endpoint = "localhost:1234"
    assert(c.get_endpoint() == "http://localhost:1234")
Ejemplo n.º 2
0
 def test_full_custom_get_endpoint_no_use_ssl(self):
     c = Configuration()
     c.use_ssl = False
     c.endpoint = "https://localhost:1234"
     self.assertEqual(c.get_endpoint(), "http://localhost:1234")
Ejemplo n.º 3
0
 def test_full_custom_get_endpoint_no_use_ssl(self):
     c = Configuration()
     c.use_ssl = False
     c.endpoint = "https://localhost:1234"
     self.assertEqual(c.get_endpoint(), "http://localhost:1234")
Ejemplo n.º 4
0
 def test_custom_get_endpoint_default_ssl(self):
     c = Configuration()
     c.endpoint = "localhost:1234"
     self.assertEqual(c.get_endpoint(), "https://localhost:1234")
Ejemplo n.º 5
0
 def test_custom_get_endpoint_default_ssl(self):
     c = Configuration()
     c.endpoint = "localhost:1234"
     self.assertEqual(c.get_endpoint(), "https://localhost:1234")