diff --git a/HISTORY.rst b/HISTORY.rst index 45ef1e7..71d4fdb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +1.0.1 (2018-08-02) +++++++++++++++++++ + +**Bugfixes** + +- Supported relative location of db storage. + + 1.0.0 (2018-07-02) ++++++++++++++++++ diff --git a/conf.sample.py b/conf.sample.py index 6b30ba6..01a2503 100644 --- a/conf.sample.py +++ b/conf.sample.py @@ -1,4 +1,9 @@ # -*- coding: utf-8 -*- +import os + +here = os.path.dirname(os.path.abspath(__file__)) + + accounts = { 'OTA.TCH': { 'user': 'ota_grs101', @@ -12,7 +17,7 @@ sender = ('Anton Yakovlev', 'anton.yakovlev@a.gentlemantravel.club') recipient_info = 'airquota@ota.ru' recipient_alert = 'airquota.alert@ota.ru' -db_name = 'db/quota.db' +db_name = os.path.join(here, 'db/quota.db') smtp_gateway= 'email-smtp.eu-west-1.amazonaws.com' smtp_port = 587 smtp_user = 'aws_ses_user' diff --git a/tests/test_db.py b/tests/test_db.py index 2e6ae9c..16f722f 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -4,9 +4,11 @@ import pytest from manage import setup_store +here = os.path.dirname(os.path.abspath(__file__)) + class TestDB(): - db_name = 'db/test.db' + db_name = os.path.join(here, '../db/test.db') def test_init_db(self): try: