[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: make 'both' 'direction'
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: make 'both' 'direction' exist |
Date: |
Thu, 07 Dec 2017 17:07:25 +0100 |
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 51fe2d3 make 'both' 'direction' exist
51fe2d3 is described below
commit 51fe2d390ba8b7fff879b2819070a468100ac3e8
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Dec 7 17:07:03 2017 +0100
make 'both' 'direction' exist
---
talerbank/app/schemas.py | 3 +--
talerbank/app/tests.py | 8 ++++----
talerbank/app/views.py | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/talerbank/app/schemas.py b/talerbank/app/schemas.py
index 5fb2ebe..f441ee5 100644
--- a/talerbank/app/schemas.py
+++ b/talerbank/app/schemas.py
@@ -85,8 +85,7 @@ HISTORY_REQUEST_SCHEMA = {
"pattern": "^([0-9]+)$",
"required": False},
"direction": {"type": "string",
- "pattern": "^(debit|credit)$"}
- "required": False},
+ "pattern": "^(debit|credit|both|cancel\+|cancel-)$"},
"account_number": {"type": "string",
"pattern": "^([0-9]+)$",
"required": False}
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 8894cec..b69fa4e 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -305,15 +305,15 @@ class HistoryTestCase(TestCase):
def test_history(self):
client = Client()
for ctx in (HistoryContext(expected_resp={"status": 200},
- delta="4"),
+ delta="4", direction="both"),
HistoryContext(expected_resp={
"field": "row_id", "value": 6,
- "status": 200}, delta="+1", start="5",),
+ "status": 200}, delta="+1", start="5",
direction="both"),
HistoryContext(expected_resp={
"field": "wt_subject", "value": "h",
- "status": 200}, delta="-1"),
+ "status": 200}, delta="-1", direction="both"),
HistoryContext(expected_resp={"status": 204},
- delta="1", start="11"),
+ delta="1", start="11", direction="both"),
HistoryContext(expected_resp={"status": 204},
delta="+1", direction="credit"),
HistoryContext(expected_resp={"status": 200},
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index b5c3ede..bb8ed18 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -383,7 +383,7 @@ def serve_history(request, user_account):
if sign == "-":
sign_filter = Q(id__lt=start)
- # direction (debit/credit)
+ # assume 'both' is given
direction = request.GET.get("direction")
query_string = Q(debit_account=user_account.bankaccount) \
--
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: make 'both' 'direction' exist,
gnunet <=