          'user': request.user.username
      })
  
  
  urlpatterns = patterns('',
      url(r'^view/$', view),
      url(r'^session-view/$', session_view),
  )
  
 
</s>
@api_view(['GET', 'POST'])
def session_view(request):
    active_session = request.session.get('active_session', False)
    request.session['active_session'] = True
    return Response({
        'active_session': active_session
    })


          'user': request.user.username
      })
  
  
@api_view(['GET', 'POST'])
def session_view(request):
    active_session = request.session.get('active_session', False)
    request.session['active_session'] = True
    return Response({
        'active_session': active_session
    })


  urlpatterns = patterns('',
      url(r'^view/$', view),
      url(r'^session-view/$', session_view),
  )
  
keep keep keep add keep keep keep keep keep
 force_authenticate(None) also clears session info.

Closes #1055.
rest_framework/tests/test_testing.py