how to test a signal that recived request and user objects?
hi,
I would like to write a signal handler that logs the user in when its
account gets activated.
My signal handler is registered with user_activated from django-
registration, and my initial guess was this:
def log_user_in(sender, **kwargs):
login(kwargs['request'], kwargs['user'])
user_activated.connect(log_user_in)
but some reason, this won't work. Could someone give me a hint on how
to debug this? As I prefer writing unit tests, the best would be an
example of how can I create a request object to call the above method.
thanks
V
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home