fediverse-devnet / feditest-tests-fediverse

The tests for the fediverse testsuite
MIT License
5 stars 4 forks source link

False negative on Lemmy test: requires_resource_uri_jrd #98

Closed steve-bate closed 1 week ago

steve-bate commented 2 weeks ago

tests/webfinger/server/4_2__3_requires_resource_uri.py::requires_resource_uri_jrd

This test has a check like:

    if content_type.startswith('application/json'):
        hard_assert_that(
                calling(lambda: ClaimedJrd.create_and_validate(response_without.payload)),
                any_of( raises(RuntimeError),
                        raises(JSONDecodeError)),
                f'Returns JRD content.\nAccessed URI: "{ uri_without }".')

The lemmy failure description is:

Returns JRD content.
Accessed URI: "https://lemmy.ml/.well-known/webfinger".
Expected: (Expected a callable raising <class 'RuntimeError'> or Expected a callable raising <class 'json.decoder.JSONDecodeError'>)
but: was <hamcrest.core.core.raises.DeferredCallable object at 0x103750a50>

(Note the DeferredCallable reference...)

With a payload of:

{"error":"unknown","message":"Query deserialize error: missing field `resource`"}

It seems like this should be a pass.