def test_sanitize_url(self):
    self.assertEqual(sanitize_url('//foo.bar'), 'http://foo.bar')
    self.assertEqual(sanitize_url('httpss://foo.bar'), 'https://foo.bar')
    self.assertEqual(sanitize_url('rmtps://foo.bar'), 'rtmps://foo.bar')
    self.assertEqual(sanitize_url('https://foo.bar'), 'https://foo.bar')
    self.assertEqual(sanitize_url('foo bar'), 'foo bar')
def test_sanitize_url(self):
    self.assertEqual(sanitize_url('//foo.bar'), 'http://foo.bar')
    self.assertEqual(sanitize_url('httpss://foo.bar'), 'https://foo.bar')
    self.assertEqual(sanitize_url('rmtps://foo.bar'), 'rtmps://foo.bar')
    self.assertEqual(sanitize_url('https://foo.bar'), 'https://foo.bar')
    self.assertEqual(sanitize_url('foo bar'), 'foo bar')