'Scenario: Login with an invalid redirect
Given I have opened a new course in Studio
And I am not logged in
And I visit the url "/signin?next=http://www.google.com/"
When I fill in and submit the signin form
Then I should see that the path is "/home/"'

def test_login_with_invalid_redirect(self):

    self.install_course_fixture()
    self.course_outline_sign_in_redirect_page.visit()
    self.browser.get((self.browser.current_url.split('=')[0] + '=http://www.google.com'))
    self.course_outline_sign_in_redirect_page.login(self.user['email'], self.user['password'])
    home = HomePage(self.browser)
    home.wait_for_page()
    self.assertEqual(self.browser.current_url, home.url)
