[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 93c972aff35587effc33d8400e60dcadee01ab27
Author: hiro <hiro@xxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxx")
-        msg_str = "From: \"GetTor Test\" <test.gettor.browser@xxxxxxxxx>\n Subject: \r\n Reply-To: test.gettor.browser@xxxxxxxxx \nTo: gettor@xxxxxxxxxxxxxx\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@xxxxxxxxxxxxxx", 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@xxxxxxxxxxxxxx")
         request = ep.parse("From: \"silvia [hiro]\" <hiro@xxxxxxxxxxxxxx>\n Subject: \r\n Reply-To: hiro@xxxxxxxxxxxxxx \nTo: gettor@xxxxxxxxxxxxxx\n osx en")



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits