|
|
|
@ -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]
|
|
|
|
|