I figured it out. When I first set up my settings.py file, I did: AUTHENTICATION_BACKENDS = ( 'socialregistration.auth.FacebookAuth', )
which breaks (well, omits) the default authentication module that client.login() depends on. I needed to do: AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'socialregistration.auth.FacebookAuth', ) On Apr 26, 2011, at 12:56 PM, Roy Smith wrote: > I've got a test case that essentially looks like this: > > ---------------------------------------------------------------------------------- > from django.test import TestCase > from django.test.client import Client > from django.contrib.auth.models import User > > class ApiTest(TestCase): > def test_login(self): > username = 'foo' > email = 'f...@example.com' > password = 'secret' > user = User.objects.create_user(username, mail, > password=password) > assert user.username == username > assert user.is_active > client = Client() > assert client.login(username=username, password=password) # > this assertion fails > ---------------------------------------------------------------------------------- > > When I run it, the client.login() assertion fails. Any idea what I > might be doing wrong? > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > --- Roy Smith r...@panix.com -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.