In integration tests, I like that you can set the Accept
header ahead of time (i.e. before the request is made):
self.accept = "application/json"
AFAIK this is the only header that can be set in this way. I am
missing a way to set any header arbitrarily in the setup phase of these
tests. Without it, the alternatives seem to be a) duplicated test code,
or b) wrapping the request helpers. Setting a header as in the case of accept=
would be preferable to me.
Are there plans to enhance the integration tests in this way? Or reasons to not want to? If acceptable, I'd be happy to tackle this, but wanted to check first. Thanks!
P.S. I had this objection from Rafael França:
You are able to set the headers when doing the request so why you need to do it globally? Duplication in tests is totally fine and even make the tests more clear.