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")
 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")
 def test_custom_get_endpoint_default_ssl(self):
     c = Configuration()
     c.endpoint = "localhost:1234"
     self.assertEqual(c.get_endpoint(), "https://localhost:1234")
 def test_get_endpoint_no_use_ssl(self):
     c = Configuration()
     c.use_ssl = False
     self.assertEqual(c.get_endpoint(), "http://notify.bugsnag.com")
Esempio n. 5
0
 def test_get_endpoint_use_ssl(self):
     c = Configuration()
     c.use_ssl = True
     self.assertEqual(c.get_endpoint(), "https://notify.bugsnag.com")
Esempio n. 6
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")
Esempio n. 7
0
 def test_custom_get_endpoint_default_ssl(self):
     c = Configuration()
     c.endpoint = "localhost:1234"
     self.assertEqual(c.get_endpoint(), "https://localhost:1234")