Skip to content

Commit 9807ba3

Browse files
committed
SMS service test file error catching and import editing
- ApiException import path fixed - Unnecessary import line removed - Error catching scenario in test file improved
1 parent 8e14817 commit 9807ba3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/test_sms_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88
from dotenv import load_dotenv
99
from netgsm import Netgsm
10-
from netgsm.exceptions import ApiException
10+
from netgsm.exceptions.api_exception import ApiException
1111

1212

1313
class TestSmsService(unittest.TestCase):
@@ -68,7 +68,6 @@ def test_send_sms_failure(self, mock_post):
6868
Tests SMS sending failure case.
6969
"""
7070
# Set up to throw ApiException
71-
from netgsm.exceptions.api_exception import ApiException
7271
mock_post.side_effect = ApiException("API error")
7372

7473
# Specify that we expect an error

0 commit comments

Comments
 (0)