Example #1
0
    def test_associated(self, bus_event_associated, sysconf_command_association_updated):
        user_voicemail = UserVoicemail(user_id=1, voicemail_id=2)

        notifier.associated(user_voicemail)

        sysconf_command_association_updated.assert_called_once_with(user_voicemail)
        bus_event_associated.assert_called_once_with(user_voicemail)
Example #2
0
def associate(user_voicemail):
    validator.validate_association(user_voicemail)
    dao.associate(user_voicemail)
    notifier.associated(user_voicemail)
    return user_voicemail