def test_get_dsn_with_port(self): key = ProjectKey(project_id=1, public_key='public', secret_key='secret') with self.settings(SENTRY_URL_PREFIX='http://example.com:81'): self.assertEquals(key.get_dsn(), 'http://*****:*****@example.com:81/1')
def test_get_dsn_with_endpoint_setting(self): key = ProjectKey(project_id=1, public_key='public', secret_key='secret') with self.settings(SENTRY_ENDPOINT='http://endpoint.com'): self.assertEquals(key.get_dsn(), 'http://*****:*****@endpoint.com/1')
def test_get_dsn_with_port(self): key = ProjectKey(project_id=1, public_key='public', secret_key='secret') with self.options({'system.url-prefix': 'http://example.com:81'}): self.assertEquals(key.get_dsn(), 'http://*****:*****@example.com:81/1')
def test_get_dsn_with_endpoint_setting(self): key = ProjectKey(project_id=1, public_key="public", secret_key="secret") with self.settings(SENTRY_ENDPOINT="http://endpoint.com"): self.assertEquals(key.get_dsn(), "http://*****:*****@endpoint.com/1")
def test_get_dsn_with_port(self): key = ProjectKey(project_id=1, public_key="public", secret_key="secret") with self.options({"system.url-prefix": "http://example.com:81"}): self.assertEquals(key.get_dsn(), "http://*****:*****@example.com:81/1")
def test_get_dsn_with_public_endpoint_setting(self): key = ProjectKey(project_id=1, public_key="public", secret_key="secret") with self.settings( SENTRY_PUBLIC_ENDPOINT="http://public_endpoint.com"): self.assertEqual(key.get_dsn(public=True), "http://public@public_endpoint.com/1")
def test_get_dsn_with_port(self): key = ProjectKey(project_id=1, public_key='public', secret_key='secret') with self.Settings(SENTRY_URL_PREFIX='http://example.com:81'): self.assertEquals(key.get_dsn(), 'http://*****:*****@example.com:81/1')
def test_get_dsn_with_port(self): key = ProjectKey(project_id=1, public_key="public", secret_key="secret") with self.Settings(SENTRY_URL_PREFIX="http://example.com:81"): self.assertEquals(key.get_dsn(), "http://*****:*****@example.com:81/1")