This commit is contained in:
Jeff Balogh 2011-06-14 16:19:24 -07:00
Родитель a36c1f55e6
Коммит c3cb6d20da
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -480,12 +480,13 @@ def test_dictionaries_link():
eq_(link.text(), 'Dictionaries & Language Packs')
@patch.object(settings._wrapped, 'KNOWN_PROXIES', ['127.0.0.1'])
def test_remote_addr():
"""Make sure we're setting REMOTE_ADDR from X_FORWARDED_FOR."""
client = test.Client()
# Send X-Forwarded-For as it shows up in a wsgi request.
client.get('/en-US/firefox/', follow=True, HTTP_X_FORWARDED_FOR='oh yeah')
eq_(commonware.log.get_remote_addr(), 'oh yeah')
client.get('/en-US/firefox/', follow=True, HTTP_X_FORWARDED_FOR='1.1.1.1')
eq_(commonware.log.get_remote_addr(), '1.1.1.1')
def test_opensearch():

Просмотреть файл

@ -1006,3 +1006,6 @@ GRAPHITE_TIMEOUT = 1
# URL to the service that triggers addon performance tests. See devhub.perf.
PERF_TEST_URL = 'http://areweperftestingyet.com/trigger.cgi'
# IP addresses of servers we use as proxies.
KNOWN_PROXIES = []