GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 4515c62f authored by Hiro's avatar Hiro 🏄
Browse files

Log checks temporarily

parent 356f68a4
......@@ -152,7 +152,14 @@ class EmailParser(object):
def too_many_requests(self, hid, num_requests, limit):
if hid == self.settings.get('test_hid'):
test_hid = self.settings.get('test_hid')
log.msg(
"test_hid {}".format(test_hid), system="email parser"
)
log.msg(
"hid {}".format(hid), system="email parser"
)
if hid == test_hid:
return False
elif num_requests < limit:
return False
......@@ -245,8 +252,6 @@ class EmailParser(object):
)
log.msg("check: {}".format(check), system="email parser")
log.msg("hid: {}".format(hid), system="email parser")
log.msg("request['id']: {}".format(request['id']), system="email parser")
if check:
log.msg(
......
......@@ -63,7 +63,6 @@ class EmailServiceTests(unittest.TestCase):
def test_too_many_request_exclude(self):
ep = conftests.EmailParser(self.settings, "gettor@torproject.org")
hid = "80d7054da0d3826563c7babb5453e18f3e42f932e562c5ab0434aec9df7b0625"
request_service = "osx"
limit = self.settings.get("email_requests_limit")
num_requests = 300
check = ep.too_many_requests(hid, num_requests, limit)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment