The following simplified code is defined in my flask app.
def select_url_for():
if request.is_secure:
return 's3'
return 'local'
I tried testing like this, and it works for HTTP.
def test_select_url_for(self):
with self.app.test_request_context():
self.assertTrue(select_url_for() == 'local')
How do I perform a similar test for the HTTPS with Flask?
I found this, but the question is unanswered. I need to run Flask in a HTTPS test mode.