def test_given_a_valid_http_url_it_does_nothing(self):
     assert_safe_url('http://www.example.com')
 def test_it_errors_when_given_a_url_with_a_tab(self):
     with self.assertRaises(AssertionError):
         assert_safe_url('http://www.example.com/\t/foobar')
 def test_it_errors_when_given_a_url_with_a_single_quote(self):
     with self.assertRaises(AssertionError):
         assert_safe_url('http://www.example.\'com/')
 def test_it_errors_when_given_a_url_with_a_comment_beginning_in_it(self):
     with self.assertRaises(AssertionError):
         assert_safe_url('http://www.example.com/*')
 def test_it_errors_when_given_a_url_not_beginning_with_a_valid_scheme(self):
     with self.assertRaises(AssertionError):
         assert_safe_url('ftp://www.example.com')
 def test_given_a_valid_longer_url_it_does_nothing(self):
     assert_safe_url('https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#safe=off&q=example+long+url')