Closed
Description
This is my test:
import httpretty
import unittest
import requests
from unittest import TestCase
file_cache_directory = ".testcache"
class Test(TestCase):
@httpretty.activate
def test(self):
httpretty.register_uri(
httpretty.GET,
"https://httpbin.org/ip",
body='{"origin": "127.0.0.1"}',
)
resp = requests.get("https://httpbin.org/ip")
self.assertIn("127.0.0.1", resp.text)
Which generates the following error while still executing successfully:
httpretty/core.py:495: ResourceWarning: unclosed file <_io.BufferedRandom name=4>
self.fd = FakeSockFile()
HTTPretty VERSION: 0.9.6
Python VERSION: 3.6.7
OS: 64bit Linux
Metadata
Metadata
Assignees
Labels
No labels