Skip to content

Commit 0b44ee0

Browse files
author
Steve Kirkland
committed
Unit tests added
1 parent 794a089 commit 0b44ee0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/test_configuration.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ def test_validate_endpoint(self):
114114
c.configure(endpoint='https://notify.example.com')
115115
assert c.endpoint == 'https://notify.example.com'
116116

117+
def test_validate_endpoint_bugsnag_api_key(self):
118+
c = Configuration()
119+
c.configure(api_key='12312312312312312312312312321312')
120+
assert c.endpoint == 'https://notify.bugsnag.com'
121+
122+
def test_validate_endpoint_hub_api_key(self):
123+
c = Configuration()
124+
c.configure(api_key='00000312312312312312312312321312')
125+
assert c.endpoint == 'https://notify.insighthub.smartbear.com'
126+
117127
def test_validate_app_type(self):
118128
c = Configuration()
119129
assert c.app_type is None
@@ -410,6 +420,17 @@ def test_validate_session_endpoint(self):
410420
c.configure(session_endpoint='https://sessions.example.com')
411421
assert c.session_endpoint == 'https://sessions.example.com'
412422

423+
def test_validate_session_endpoint_bugsnag_api_key(self):
424+
c = Configuration()
425+
c.configure(api_key='12312312312312312312312312321312')
426+
assert c.session_endpoint == 'https://sessions.bugsnag.com'
427+
428+
def test_validate_session_endpoint_hub_api_key(self):
429+
c = Configuration()
430+
c.configure(api_key='00000312312312312312312312321312')
431+
assert (c.session_endpoint ==
432+
'https://sessions.insighthub.smartbear.com')
433+
413434
def test_validate_traceback_exclude_modules(self):
414435
c = Configuration()
415436
with pytest.warns(RuntimeWarning) as record:

0 commit comments

Comments
 (0)