more test coverage

pull/1354/head
Chris Caron 2025-06-29 21:15:47 -04:00
parent c9abd69299
commit 357621c2c8
1 changed files with 6 additions and 5 deletions

View File

@ -140,6 +140,12 @@ class NotifySMPP(NotifyBase):
super().__init__(**kwargs)
self.source = None
if not (self.user and self.password):
msg = 'No SMPP user/pass combination was provided'
self.logger.warning(msg)
raise TypeError(msg)
result = is_phone_no(source)
if not result:
msg = 'The Account (From) Phone # specified ' \
@ -147,11 +153,6 @@ class NotifySMPP(NotifyBase):
self.logger.warning(msg)
raise TypeError(msg)
if not (self.user and self.password):
msg = 'No SMPP user/pass combination was provided'
self.logger.warning(msg)
raise TypeError(msg)
# Tidy source
self.source = result['full']