8000 test more credentials · Twilio-api/twilio-python@6dd329d · GitHub
[go: up one dir, main page]

Skip to content

Commit 6dd329d

Browse files
author
Kevin Burke
committed
test more credentials
1 parent d5157c5 commit 6dd329d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/test_credentials.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
from nose.tools import assert_equal
1+
from nose.tools import assert_equal, assert_raises
2+
from mock import patch
23

3-
from twilio.rest import find_credentials
4+
from twilio import TwilioException
5+
from twilio.rest import TwilioRestClient, find_credentials
46

57
def test_creds_not_found():
68
""" I shouldn't find credentials if they are not there """
@@ -15,3 +17,8 @@ def test_find_creds():
1517
}
1618
assert_equal(find_credentials(env), ('AC123', '456'))
1719

20+
@patch("twilio.rest.find_credentials")
21+
def test_creds_error(creds):
22+
creds.return_value = (None, None)
23+
assert_raises(TwilioException, TwilioRestClient)
24+

0 commit comments

Comments
 (0)
0