'Test safe next parameter'

def test_safe_next(self):

    req = self.request.get((reverse('login') + '?next={url}'.format(url='/dashboard')))
    req.META['HTTP_ACCEPT'] = 'text/html'
    next_page = get_next_url_for_login_page(req)
    self.assertEqual(next_page, u'/dashboard')
