[tor-commits] [gettor/master] Update tests to load a test config

cohosh at torproject.org cohosh at torproject.org
Thu Jan 23 18:33:31 UTC 2020


commit 2ef6773bec29b9e671d698ec671201fbb6eb3493
Author: Cecylia Bocovich <cohosh at torproject.org>
Date:   Mon Jan 20 17:50:03 2020 -0500

    Update tests to load a test config
---
 tests/test.conf.json        | 20 ++++++++++++++++++++
 tests/test_email_service.py |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/tests/test.conf.json b/tests/test.conf.json
new file mode 100644
index 0000000..8f296cc
--- /dev/null
+++ b/tests/test.conf.json
@@ -0,0 +1,20 @@
+{
+  "platforms": ["linux", "osx", "windows"],
+  "dbname": "gettor.db",
+  "email_parser_logfile": "email_parser.log",
+  "email_requests_limit": 30,
+  "twitter_requests_limit": 1,
+  "sendmail_interval": 10,
+  "twitter_interval": 10,
+  "sendmail_addr": "gettor at torproject.org",
+  "sendmail_host": "localhost",
+  "sendmail_port": 587,
+  "consumer_key": "",
+  "consumer_secret": "",
+  "access_key": "",
+  "access_secret": "",
+  "test_hid": "80d7054da0d3826563c7babb5453e18f3e42f932e562c5ab0434aec9df7b0625",
+  "twitter_handle": "get_tor",
+  "twitter_messages_endpoint": "https://api.twitter.com/1.1/direct_messages/events/list.json",
+  "twitter_new_message_endpoint": "https://api.twitter.com/1.1/direct_messages/events/new.json"
+}
diff --git a/tests/test_email_service.py b/tests/test_email_service.py
index ff364f0..187711e 100644
--- a/tests/test_email_service.py
+++ b/tests/test_email_service.py
@@ -13,7 +13,7 @@ class EmailServiceTests(unittest.TestCase):
     # Fail any tests which take longer than 15 seconds.
     timeout = 15
     def setUp(self):
-        self.settings = conftests.options.parse_settings("en","./gettor.conf.json")
+        self.settings = conftests.options.parse_settings("en","tests/test.conf.json")
         self.sm_client = conftests.Sendmail(self.settings)
         self.locales = conftests.strings.get_locales()
         self.links = [





More information about the tor-commits mailing list