Commit 93c972af authored by Hiro's avatar Hiro 🏄
Browse files

Remove test

parent 0ffadaaa
......@@ -198,7 +198,7 @@ class EmailParser(object):
return request
def check_num_request(self, request_id, request_service, limit):
def check_num_requests(self, request_id, request_service, limit):
now_str = datetime.now().strftime("%Y%m%d%H%M%S")
dbname = self.settings.get("dbname")
conn = SQLite3(dbname)
......@@ -235,7 +235,7 @@ class EmailParser(object):
"Found request for {}.".format(request['command']),
system="email parser"
)
if check_num_request(request['id'], request['service'], email_request_limit):
if check_num_requests(request['id'], request['service'], email_requests_limit):
conn.new_request(
id=request['id'],
command=request['command'],
......
......@@ -58,17 +58,6 @@ class EmailServiceTests(unittest.TestCase):
self.assertEqual(request["platform"], "osx")
self.assertEqual(request["language"], "es")
def test_remove_limits(self):
ep = conftests.EmailParser(self.settings, "gettor@torproject.org")
msg_str = "From: \"GetTor Test\" <test.gettor.browser@gmail.com>\n Subject: \r\n Reply-To: test.gettor.browser@gmail.com \nTo: gettor@torproject.org\r\n osx es"
msg = conftests.message_from_string(msg_str)
languages = [*self.locales.keys()]
platforms = self.settings.get('platforms')
request = ep.build_request(msg_str, "hiro@torproject.org", languages, platforms)
email_requests_limit = self.settings.get("email_requests_limit")
check = check_num_request(request['id'], request['service'], email_request_limit)
assert check
def test_language_email_parser(self):
ep = conftests.EmailParser(self.settings, "gettor@torproject.org")
request = ep.parse("From: \"silvia [hiro]\" <hiro@torproject.org>\n Subject: \r\n Reply-To: hiro@torproject.org \nTo: gettor@torproject.org\n osx en")
......
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