Browse Source

Add test showing it is impossible to add CERT entry

with the current REST API, which it was proposed to be used in the
mixnet.
master
juga 2 years ago
parent
commit
73005028c8
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      tests/test_gnunet.py

+ 21
- 0
tests/test_gnunet.py View File

@ -137,3 +137,24 @@ def test_list_gns_record_type():
assert 'pepfoundation.alice' == r['record_name']
# Even if there're several records, all should be type A
assert 'A' == r['data'][0]['record_type']
def test_add_cert_entry():
"""
Test that is not possible to add a record type ``CERT`` via REST.
Even if it is implement in GNS:
https://git.gnunet.org/gnunet.git/tree/src/gnsrecord/plugin_gnsrecord_dns.c#n130
"""
r = REST_CLIENT.add_namestore_entry(
"alice",
"pepfoundation",
"foo",
"CERT"
)
assert r[0] is False
# In gnunet logs it can be seen the line:
# ``gnunet-rest-server-12 ERROR Value invalid for record type```
# But the REST API only returns this.
assert "Internal Server Error" == r[1]

Loading…
Cancel
Save