fediverse-devnet / feditest-tests-fediverse

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

Remove missing 'follow_redirects' parameter #71

Closed MikePlayle closed 1 month ago

MikePlayle commented 1 month ago

Simplest possible fix for the following failure which I saw:

2024-05-11T13:35:37Z [ERROR] feditest: FAILED test (other reason): webfinger.server.4__3_only_returns_jrd_in_response_to_https_requests::only_returns_jrd_in_response_to_https: WebClient.http_get() got an unexpected keyword argument 'follow_redirects' Traceback (most recent call last):

  File "/home/mike/devel/fediverse/feditest/feditest/venv/lib/python3.11/site-packages/feditest/__init__.py", line 91, in run
    self.test_function(**args)

  File "/home/mike/devel/fediverse/feditest/feditest-tests-fediverse/tests/webfinger/server/4__3_only_returns_jrd_in_response_to_https_requests.py", line 27, in only_returns_jrd_in_response_to_https
    http_response : HttpResponse = client.http_get(http_webfinger_uri, follow_redirects=False).response
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: WebClient.http_get() got an unexpected keyword argument 'follow_redirects'
steve-bate commented 1 month ago

I think this is a side-effect from merging dependent PRs out-of-order. Feditest PR #97 adds the follow_redirects argument, which defaults to True.

jernst commented 1 month ago

Thanks @MikePlayle, the parameter is back in the code so we don't need to do this: https://github.com/fediverse-devnet/feditest/blob/6cf855659e4f97b81e47fe8a3b93d2a0b4fc02f7/src/feditest/protocols/web/__init__.py#L90