'Test edge homepage redirect to lms login.'

def test_edge_redirect_to_login(self):

    request = self.factory.get('/')
    request.user = AnonymousUser()
    request.META['HTTP_HOST'] = 'edge.edx.org'
    response = index(request)
    self.assertIsInstance(response, HttpResponseRedirect)
    self.assertEqual(response._headers.get('location')[1], '/login')
