コード例 #1
0
 def test_having_port(self):
     """basic auth creds correctly stripped from URL containing creds even if URL
     contains port"""
     url = 'https://*****:*****@domain.com:8080/project/objects.inv'
     expected = 'https://domain.com:8080/project/objects.inv'
     actual = _strip_basic_auth(url)
     self.assertEqual(expected, actual)
コード例 #2
0
 def test_having_port(self):
     """basic auth creds correctly stripped from URL containing creds even if URL
     contains port"""
     url = 'https://*****:*****@domain.com:8080/project/objects.inv'
     expected = 'https://domain.com:8080/project/objects.inv'
     actual = _strip_basic_auth(url)
     self.assertEqual(expected, actual)
コード例 #3
0
 def test_no_auth(self):
     """url unchanged if param doesn't contain basic auth creds"""
     url = "https://domain.com/project/objects.inv"
     expected = "https://domain.com/project/objects.inv"
     actual_url, actual_username, actual_password = _strip_basic_auth(url)
     self.assertEqual(expected, actual_url)
     self.assertEqual(None, actual_username)
     self.assertEqual(None, actual_password)
コード例 #4
0
 def test_auth_stripped(self):
     """basic auth creds stripped from URL containing creds"""
     url = "https://*****:*****@domain.com/project/objects.inv"
     expected = "https://domain.com/project/objects.inv"
     actual_url, actual_username, actual_password = _strip_basic_auth(url)
     self.assertEqual(expected, actual_url)
     self.assertEqual("user", actual_username)
     self.assertEqual("12345", actual_password)
コード例 #5
0
 def test_no_auth(self):
     """url unchanged if param doesn't contain basic auth creds"""
     url = 'https://domain.com/project/objects.inv'
     expected = 'https://domain.com/project/objects.inv'
     actual_url, actual_username, actual_password = _strip_basic_auth(url)
     self.assertEqual(expected, actual_url)
     self.assertEqual(None, actual_username)
     self.assertEqual(None, actual_password)
コード例 #6
0
 def test_auth_stripped(self):
     """basic auth creds stripped from URL containing creds"""
     url = 'https://*****:*****@domain.com/project/objects.inv'
     expected = 'https://domain.com/project/objects.inv'
     actual_url, actual_username, actual_password = _strip_basic_auth(url)
     self.assertEqual(expected, actual_url)
     self.assertEqual('user', actual_username)
     self.assertEqual('12345', actual_password)
コード例 #7
0
 def test_no_auth(self):
     """url unchanged if param doesn't contain basic auth creds"""
     url = 'https://domain.com/project/objects.inv'
     expected = 'https://domain.com/project/objects.inv'
     actual = _strip_basic_auth(url)
     self.assertEqual(expected, actual)
コード例 #8
0
 def test_auth_stripped(self):
     """basic auth creds stripped from URL containing creds"""
     url = 'https://*****:*****@domain.com/project/objects.inv'
     expected = 'https://domain.com/project/objects.inv'
     actual = _strip_basic_auth(url)
     self.assertEqual(expected, actual)