From e47c11e10b8bee7d6b46471344524a6bb70d413d Mon Sep 17 00:00:00 2001 From: Sergey Popinevskiy Date: Tue, 3 Jul 2018 00:18:48 +0300 Subject: [PATCH 1/3] Supported relative location of db store (#6) --- conf.sample.py | 7 ++++++- tests/test_db.py | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) 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: From 6736df0439e2706957f4614586d0d2026c64815d Mon Sep 17 00:00:00 2001 From: Sergey Popinevskiy Date: Tue, 3 Jul 2018 00:23:21 +0300 Subject: [PATCH 2/3] Fixed #4 --- HISTORY.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 45ef1e7..8c0e687 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +dev ++++ + +**Bugfixes** + +- Supported relative location of db storage. + + 1.0.0 (2018-07-02) ++++++++++++++++++ From 5914d84754e954597ed292ca96b93ed6bd0df756 Mon Sep 17 00:00:00 2001 From: Sergey Popinevskiy Date: Sun, 5 Aug 2018 19:17:43 +0300 Subject: [PATCH 3/3] Prepare release v1.0.1 --- HISTORY.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 8c0e687..71d4fdb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,8 +3,8 @@ Release History =============== -dev -+++ +1.0.1 (2018-08-02) +++++++++++++++++++ **Bugfixes**