gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: adapt test runner to new API


From: gnunet
Subject: [libeufin] branch master updated: adapt test runner to new API
Date: Thu, 14 May 2020 20:44:58 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 081f9a4  adapt test runner to new API
081f9a4 is described below

commit 081f9a4f105c6f2855a382df09dab5eea4bf4fb9
Author: MS <address@hidden>
AuthorDate: Thu May 14 20:44:34 2020 +0200

    adapt test runner to new API
---
 integration-tests/test-ebics-new.py               | 28 +++++++++++------------
 nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt | 14 ------------
 util/src/main/kotlin/strings.kt                   |  2 +-
 3 files changed, 14 insertions(+), 30 deletions(-)

diff --git a/integration-tests/test-ebics-new.py 
b/integration-tests/test-ebics-new.py
index 5a11be8..db9b530 100755
--- a/integration-tests/test-ebics-new.py
+++ b/integration-tests/test-ebics-new.py
@@ -267,27 +267,25 @@ resp = assertResponse(
 )
 assert(len(resp.json().get("transactions")) == 0)
 
-nexus.terminate()
-sandbox.terminate()
-exit(44)
-
-#5.a
+#5.a, prepare a payment
 assertResponse(
     post(
-        "http://localhost:5001/users/{}/prepare-payment".format(USERNAME),
+        
"http://localhost:5001/bank-accounts/{}/prepared-payments".format(BANK_ACCOUNT_LABEL),
         json=dict(
-            creditorIban="FR7630006000011234567890189",
-            creditorBic="AGRIFRPP",
-            creditorName="Jacques La Fayette",
-            debitorIban=SUBSCRIBER_IBAN,
-            debitorBic=SUBSCRIBER_BIC,
-            debitorName=SUBSCRIBER_NAME,
-        subject="integration test",
-        sum=1
-        )
+            iban="FR7630006000011234567890189",
+            bic="AGRIFRPP",
+            name="Jacques La Fayette",
+            subject="integration test",
+            amount="EUR:1"
+        ),
+        headers=dict(Authorization=USER_AUTHORIZATION_HEADER)
     )
 )
 
+nexus.terminate()
+sandbox.terminate()
+exit(44)
+
 #5.b
 assertResponse(
     post("http://localhost:5001/ebics/execute-payments";)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
index b010332..7b764f2 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
@@ -222,17 +222,3 @@ data class Pain001Data(
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/util/src/main/kotlin/strings.kt b/util/src/main/kotlin/strings.kt
index f8b0c21..62e3265 100644
--- a/util/src/main/kotlin/strings.kt
+++ b/util/src/main/kotlin/strings.kt
@@ -79,7 +79,7 @@ data class AmountWithCurrency(
 
 fun parseAmount(amount: String): AmountWithCurrency {
     val match = Regex("([A-Z]+):([0-9]+(\\.[0-9]+)?)").find(amount) ?: throw
-    UtilError(HttpStatusCode.BadRequest, "invalid payto URI ($amount)")
+    UtilError(HttpStatusCode.BadRequest, "invalid amount: $amount")
     val (currency, number) = match.destructured
     return AmountWithCurrency(currency, Amount(number))
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]