[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: See note 12332 of bug #
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: See note 12332 of bug #5045 (fixed). |
Date: |
Mon, 17 Jul 2017 12:51:52 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
The following commit(s) were added to refs/heads/master by this push:
new 2683506 See note 12332 of bug #5045 (fixed).
2683506 is described below
commit 2683506ac2cdf228668b3547dd548e5c92802bcf
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Jul 17 12:50:39 2017 +0200
See note 12332 of bug #5045 (fixed).
---
Makefile.am | 4 +++-
bank-check-alt-nocurrency.conf | 10 ++++++++++
talerbank/app/tests_alt.py | 3 +++
talerbank/talerconfig.py | 8 ++++----
4 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index d8703f6..05fa394 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,8 +29,10 @@ check:
@export DJANGO_SETTINGS_MODULE="talerbank.settings"
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="non-existent.conf" && python3 -m
django test talerbank.app.tests ; test 3 = $$?
@printf --
"\n\n----------------------------------------------------------------------\nTesting
against bad db string\n\n"
@export DJANGO_SETTINGS_MODULE="talerbank.settings"
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-baddb.conf" &&
python3 -m django test talerbank.app.tests_alt.BadDatabaseStringTestCase ; test
2 = $$?
- @printf --
"\n\n----------------------------------------------------------------------\nTesting
against bad db string\n\n"
+ @printf --
"\n\n----------------------------------------------------------------------\nTesting
against bad amount\n\n"
@export DJANGO_SETTINGS_MODULE="talerbank.settings"
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-badamount.conf" &&
python3 -m django test talerbank.app.tests_alt.BadMaxDebtOptionTestCase
+ @printf --
"\n\n----------------------------------------------------------------------\nTesting
against no currency in config\n\n"
+ @export DJANGO_SETTINGS_MODULE="talerbank.settings"
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-nocurrency.conf" &&
python3 -m django test talerbank.app.tests_alt.NoCurrencyOptionTestCase
# install into prefix
install-exec-hook:
diff --git a/bank-check-alt-nocurrency.conf b/bank-check-alt-nocurrency.conf
new file mode 100644
index 0000000..78c95a9
--- /dev/null
+++ b/bank-check-alt-nocurrency.conf
@@ -0,0 +1,10 @@
+[bank]
+
+# Which database should we use?
+DATABASE = postgres:///talerbank
+
+# FIXME
+MAX_DEBT = KUDOS:50
+
+# FIXME
+MAX_DEBT_BANK = KUDOS:0
diff --git a/talerbank/app/tests_alt.py b/talerbank/app/tests_alt.py
index 12adeb5..cf782d1 100644
--- a/talerbank/app/tests_alt.py
+++ b/talerbank/app/tests_alt.py
@@ -46,3 +46,6 @@ class BadMaxDebtOptionTestCase(TestCase):
return
# Force to have at least one bad amount in config
self.assertTrue(False)
+
+class NoCurrencyOptionTestCase(TestCase):
+ pass
diff --git a/talerbank/talerconfig.py b/talerbank/talerconfig.py
index 018ef2d..b686240 100644
--- a/talerbank/talerconfig.py
+++ b/talerbank/talerconfig.py
@@ -137,7 +137,7 @@ class Entry:
def __str__(self):
return self.value
- def value_string(self, default=None, warn=False, required=False):
+ def value_string(self, default=None, required=False, warn=False):
if required and self.value is None:
raise ConfigurationError("Missing required option '%s' in section
'%s'" % (self.option.upper(), self.section.upper()))
if self.value is None:
@@ -146,11 +146,11 @@ class Entry:
logger.warn("Configuration is missing option '%s' in
section '%s', falling back to '%s'",
self.option, self.section, default)
else:
- logger.warn("Configuration is missing option '%s' in
section '%s'", self.option.upper(), self.section.upper())
+ logger.warn("Configuration ** is missing option '%s' in
section '%s'", self.option.upper(), self.section.upper())
return default
return self.value
- def value_int(self, default=None, warn=False, required=False):
+ def value_int(self, default=None, required=False, warn=False):
v = self.value_string(default, warn, required)
if v is None:
return None
@@ -168,7 +168,7 @@ class Entry:
return x
return None
- def value_filename(self, default=None, warn=False, required=False):
+ def value_filename(self, default=None, required=False, warn=False):
v = self.value_string(default, warn, required)
if v is None:
return None
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-bank] branch master updated: See note 12332 of bug #5045 (fixed).,
gnunet <=