diff options
author | MS <ms@taler.net> | 2020-09-08 18:46:05 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2020-09-08 18:46:05 +0200 |
commit | f3a2bf68bef89428d7a3885531b1780d51f6a81b (patch) | |
tree | e68ecd3d77e71811baf5f969ac1a63cc3ca4a7b7 /integration-tests/json_checks.py | |
parent | 0c3208483bf2d8984ef20f2fc416ef31865197a6 (diff) | |
download | libeufin-f3a2bf68bef89428d7a3885531b1780d51f6a81b.tar.gz libeufin-f3a2bf68bef89428d7a3885531b1780d51f6a81b.tar.bz2 libeufin-f3a2bf68bef89428d7a3885531b1780d51f6a81b.zip |
more types checked
Diffstat (limited to 'integration-tests/json_checks.py')
-rw-r--r-- | integration-tests/json_checks.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/integration-tests/json_checks.py b/integration-tests/json_checks.py new file mode 100644 index 00000000..10a3d0b7 --- /dev/null +++ b/integration-tests/json_checks.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +# This minimal library checks only if the JSON values +# contains the expected fields, without actually checking +# if the fields' value match the API. + +from util import CheckJsonField as F, CheckJsonTop as T + +def checkNewUserRequest(json): + c = T(F("username"), F("password")) + return c.check(json) + +def checkNewEbicsConnection(json): + c = T( + F("source"), + F("name"), + F("type"), + F("data", T( + F("ebicsURL"), + F("hostID"), + F("partnerID"), + F("userID"), + )) + ) + return c.check(json) + +def checkImportAccount(json): + c = T(F("nexusBankAccountId"), F("offeredAccountId")) + return c.check(json) |