File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1860,19 +1860,15 @@ async def _send_request(*args: Any, **kwargs: Any) -> IResponse:
18601860 # Try the rate limit again, testing the eighth request fails. We discard the
18611861 # seventh request because it may or may not be rate limited (see above). The
18621862 # eighth request would *definitely* be rate limited though, so we test that.
1863- last_i = 10
1864- for i in range (last_i ):
1863+ for i in range (2 ):
18651864 channel4 = self .make_request (
18661865 "GET" ,
18671866 f"/_matrix/client/v1/media/download/remote.org/abcde{ i } " ,
18681867 shorthand = False ,
18691868 access_token = self .tok ,
18701869 )
1871- if i >= ( last_i - 1 ) : # test for second request (which will be #8)
1870+ if i == 1 : # test for second request (which will be #8)
18721871 assert channel4 .code == 429
1873- if channel4 .code == 429 :
1874- assert channel4 .code == 200
1875- break
18761872 # else, discard 7th request because it's unhelpful
18771873
18781874 def test_file_download (self ) -> None :
You can’t perform that action at this time.
0 commit comments