Answer the question
In order to leave comments, you need to log in
How to authorize for a GET/POST request?
from webtest import TestApp
class TestRest:
def test_create(self, user, testapp):
res = testapp.get('/api/secret', extra_environ=dict(REMOTE_USER=user.email))
assert res.status_code == 200
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question