Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fix for whatsapp test #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ooni/nettests/blocking/whatsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from twisted.internet.endpoints import TCP4ClientEndpoint

from ooni.utils import log
from ooni.common.http_utils import extractTitle
from ooni.common.http_utils import extractTitle, REQUEST_HEADERS
from ooni.common.tcp_utils import TCPConnectFactory
from ooni.errors import failureToString

Expand Down Expand Up @@ -264,7 +264,7 @@ class WhatsappTest(httpt.HTTPTest, dnst.DNSTest):
description = ("This test examines the reachability of WhatsApp "
" and WhatsApp's web interface (web.whatsapp.com) in your network.")
author = "Arturo Filastò"
version = "0.6.0"
version = "0.6.1"

requiresRoot = False
requiresTor = False
Expand All @@ -285,7 +285,7 @@ def test_registration_server(self):
# {"status": "fail", "reason": "missing_param", "param": "code"}

try:
yield self.doRequest(url, 'GET')
yield self.doRequest(url, 'GET', headers=REQUEST_HEADERS)
except Exception as exc:
failure_string = failureToString(defer.failure.Failure(exc))
log.err("Failed to contact the registration server %s" % failure_string)
Expand All @@ -299,7 +299,7 @@ def test_registration_server(self):
@defer.inlineCallbacks
def _test_whatsapp_web(self, url):
try:
response = yield self.doRequest(url, 'GET')
response = yield self.doRequest(url, 'GET', headers=REQUEST_HEADERS)
except Exception as exc:
failure_string = failureToString(defer.failure.Failure(exc))
log.err("Failed to connect to whatsapp web %s" % failure_string)
Expand Down