Skip to content
CodeKruPro

Check response time with requests

QuizMediumPython only

Which check asserts that GET /products answered within 2 seconds?

  • assert r.elapsed.total_seconds() < 2
  • assert r.elapsed < 2
  • assert r.time < 2000
  • assert requests.timeout(2)

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in