Oct-15-2018, 09:47 AM
Hello all,
Have to write couple unittests for nested function.
This is simplified version
I want to capture the return value from _matchConditions
for my tests and also mock send_mail function,
so mails are not actually send on match.
Have to write couple unittests for nested function.
This is simplified version
def processSubscription( self, command, **conditions ): def _matchConditions(request_conditions, command_conditions): if request_conditions in command_conditions: return True else return False if _matchConditions(conditions, command_conditions): subscribers = subscription['emails'] send_mail(subscribers)
I want to capture the return value from _matchConditions
for my tests and also mock send_mail function,
so mails are not actually send on match.