commit 93c972aff35587effc33d8400e60dcadee01ab27 Author: hiro hiro@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@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")
tor-commits@lists.torproject.org