Beispiel #1
0
 def test_ip_headers_setter_invalid(self):
     config = Configuration()
     with self.assertRaises(ConfigurationError):
         config.ip_headers = 'invalid'
Beispiel #2
0
 def test_ip_headers_setter_valid(self):
     config = Configuration()
     config.ip_headers = ['HTTP_X_FORWARDED_FOR']
     self.assertEqual(config.ip_headers, ['X-Forwarded-For'])