comparison antispam/receivers.py @ 934:9d6c2ed2f348

Add unit test for antispam signal handlers.
author Brian Neal <bgneal@gmail.com>
date Thu, 16 Apr 2015 20:49:19 -0500
parents 988782c6ce6c
children
comparison
equal deleted inserted replaced
933:0aa9aeaa98a6 934:9d6c2ed2f348
22 """Signal callback function for a user logging in.""" 22 """Signal callback function for a user logging in."""
23 23
24 if user: 24 if user:
25 logger.info('User logout signal: %s', user.username) 25 logger.info('User logout signal: %s', user.username)
26 26
27
27 def login_failed_callback(sender, credentials, **kwargs): 28 def login_failed_callback(sender, credentials, **kwargs):
28 """Signal callback for a login failure event.""" 29 """Signal callback for a login failure event."""
29 logger.error('User login failed signal from %s: %s', sender, 30 logger.error('User login failed signal from %s: %s', sender,
30 credentials.get('username')) 31 credentials.get('username'))
31 32