summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-08-22 17:30:50 -0300
committerDuda Dornelles <ddornell@thoughtworks.com>2014-08-22 17:34:14 -0300
commiteacd575c9dc3037281e1d4a6ae2e0b947737251e (patch)
tree9ad0d95f6c2eb9219909a9839905eadb32d2539a
parent6d56902df61c739870278a27cd0184a745672845 (diff)
moving pixelated.cfg out of the codebase
-rw-r--r--service/pixelated/config/pixelated_ua.cfg5
-rw-r--r--service/pixelated/user_agent.py2
-rw-r--r--service/test/adapter/mail_service_test.py2
3 files changed, 2 insertions, 7 deletions
diff --git a/service/pixelated/config/pixelated_ua.cfg b/service/pixelated/config/pixelated_ua.cfg
deleted file mode 100644
index b46dc95e..00000000
--- a/service/pixelated/config/pixelated_ua.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-HOST="0.0.0.0"
-PORT=3333
-LEAP_USERNAME="testuser_a003"
-LEAP_PASSWORD="testpassword"
-LEAP_SERVER_NAME="example.wazokazi.is"
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py
index 43c8d1bc..2dfd0fe0 100644
--- a/service/pixelated/user_agent.py
+++ b/service/pixelated/user_agent.py
@@ -14,7 +14,7 @@ from pixelated.adapter.pixelated_mail import PixelatedMail
from pixelated.tags import Tags
app = Flask(__name__, static_url_path='', static_folder='../../web-ui/app')
-app.config.from_pyfile('config/pixelated_ua.cfg')
+app.config.from_pyfile(os.path.join(os.environ['HOME'], '.pixelated'))
mail_service = MailService(app.config['LEAP_USERNAME'], app.config['LEAP_PASSWORD'], app.config['LEAP_SERVER_NAME'])
diff --git a/service/test/adapter/mail_service_test.py b/service/test/adapter/mail_service_test.py
index 0ca61e3c..6273fc69 100644
--- a/service/test/adapter/mail_service_test.py
+++ b/service/test/adapter/mail_service_test.py
@@ -14,7 +14,7 @@ class TestMailService(unittest.TestCase):
MailService.mailbox = Mock(messages=[test_helper.leap_mail(uid=6, leap_flags=['\\Recent'])])
MailService.account = Mock(return_value=MagicMock())
- mailservice = MailService()
+ mailservice = MailService('username', 'password', 'leap_server')
new_tags = ['test', 'inbox']
updated_tags = mailservice.update_tags(6, new_tags)