diff --git a/conservancy_beancount/config.py b/conservancy_beancount/config.py index 39a0d1a..9fb4f70 100644 --- a/conservancy_beancount/config.py +++ b/conservancy_beancount/config.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import decimal import functools import os import urllib.parse as urlparse @@ -86,6 +87,9 @@ class Config: and self._dir_or_none(cache_root / name) ) + def payment_threshold(self) -> decimal.Decimal: + return decimal.Decimal(0) + def repository_path(self) -> Optional[Path]: try: return Path(os.environ['CONSERVANCY_REPOSITORY']) diff --git a/tests/test_config.py b/tests/test_config.py index 6925293..a37635b 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -15,6 +15,7 @@ # along with this program. If not, see . import contextlib +import decimal import os import re @@ -281,3 +282,8 @@ def test_cache_path_parent_conflict(tmp_path): with update_environ(HOME=tmp_path, XDG_CACHE_DIR=None): config = config_mod.Config() assert config.cache_dir_path('TESTcache') is None + +def test_payment_threshold(): + threshold = config_mod.Config().payment_threshold() + assert threshold == 0 + assert isinstance(threshold, (int, decimal.Decimal))