@world.absorb
def log_in(username='robot', password='test', email='robot@edx.org', name='Robot'):
 url = '/auto_auth'
 params = {'username': username, 'password': password, 'email': email, 'full_name': name}
 url += ('?' + urllib.urlencode(params))
 world.visit(url)
 user = User.objects.get(username=username)
 world.scenario_dict['USER'] = user

@ world . absorb def log_in ( username = 'robot' , password = 'test' , email = 'robot@edx.org' , name = 'Robot' ) : url = '/auto_auth' params = { 'username' : username , 'password' : password , 'email' : email , 'full_name' : name } url += ( '?' + urllib . urlencode ( params ) ) world . visit ( url ) user = User . objects . get ( username = username ) world . scenario_dict [ 'USER' ] = user
use the auto_auth feature to programmatically log the user in .