01-fix-tests.patch 661 B

123456789101112
  1. --- contrib/python/responses/py2/responses/test_responses.py (index)
  2. +++ contrib/python/responses/py2/responses/test_responses.py (working tree)
  3. @@ -1022,7 +1022,8 @@ def test_response_filebody():
  4. """ Adds the possibility to use actual (binary) files as responses """
  5. def run():
  6. - current_file = os.path.abspath(__file__)
  7. + import yatest.common as yc
  8. + current_file = yc.source_path("contrib/python/responses/py2/responses/test_responses.py")
  9. with responses.RequestsMock() as m:
  10. with open(current_file, "r") as out:
  11. m.add(responses.GET, "http://example.com", body=out.read(), stream=True)