How to validate JWT in URL

How would you validate if two URLS are accessible using asserts?

url1 (this one should be valid)
url2 (this one should not work)

what I am trying to validate is in the following post :thinking: JWT validation URL

should I use fluidasserts.proto.http.is_resource_accessible(url, *args, **kwargs)

what is the recommended assert to test this?

Thank you, :dark_sunglasses:

I don’t think that http.is_resource_accessible() is the best path to go as it would show Closed only in 400-500 status codes (The success of the method here depends on the app being respectful of the status codes as per the RFC)

I think is better to use a http.has_text( 'Successful Transaction' ) or something like that given you pass a corrupted/malicious JWT

Or if the logic needs more complexity, you can use generic.check_function() to verify some check written by you

1 Like