There's not really a magic here, at the end of the day unless you're doing streaming requests is going to load all the data up into memory anyway.
If you're really worried about the memory (and it's python, you probably shouldn't) you could always load from a file on demand or something, but then i think it's much more about how you want to structure your tests than something requests_mock will help you with.
import requests
import requests_mock
def fileLoader(filename):
def loader(req, context):
with open(filename, 'r') as f:
return f.read()
return loader
with requests_mock.mock() as m:
m.get('http://test.com', text=fileLoader('abc.txt'))
resp = requests.get('http://test.com')
assert resp.text.strip() == 'ABC'