[tor-commits] [gettor/master] Remove test

hiro at torproject.org hiro at torproject.org
Tue Oct 15 14:02:17 UTC 2019


commit 93c972aff35587effc33d8400e60dcadee01ab27
Author: hiro <hiro at torproject.org>
Date:   Mon Oct 14 18:40:30 2019 +0200

    Remove test
---
 gettor/parse/email.py       |  4 ++--
 tests/test_email_service.py | 11 -----------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/gettor/parse/email.py b/gettor/parse/email.py
index 74156b0..5d65a93 100644
--- a/gettor/parse/email.py
+++ b/gettor/parse/email.py
@@ -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'],
diff --git a/tests/test_email_service.py b/tests/test_email_service.py
index f81bd17..9d50f5f 100644
--- a/tests/test_email_service.py
+++ b/tests/test_email_service.py
@@ -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 at torproject.org")
-        msg_str = "From: \"GetTor Test\" <test.gettor.browser at gmail.com>\n Subject: \r\n Reply-To: test.gettor.browser at gmail.com \nTo: gettor at 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 at 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 at torproject.org")
         request = ep.parse("From: \"silvia [hiro]\" <hiro at torproject.org>\n Subject: \r\n Reply-To: hiro at torproject.org \nTo: gettor at torproject.org\n osx en")





More information about the tor-commits mailing list