예제 #1
0
 def test_last_external_ip_from_list(self):
     remote_ip = utils.get_remote_ip({
             'HTTP_X_FORWARDED_FOR':
                 "12.123.21.11, 126.100.100.100, 10.100.20.10"})
     self.assertEquals(remote_ip, '126.100.100.100')
예제 #2
0
 def test_returns_remote_ip(self):
     remote_ip = utils.get_remote_ip({
             'REMOTE_ADDR': '127.0.0.1'})
     self.assertEquals(remote_ip, '127.0.0.1')