Yupeek/django-rest-models

Can't have test fixture data that depends on a header

Closed this issue · 1 comments

We use a header-based authentication system, which puts account details in a JSON-encoded field in the header. We can easily pull this header out of the request and set the user's account field accordingly. Data for one account should not be delivered to another.

However, there doesn't seem to be a way to set up REST fixtures so that one response can be chosen based on header data.

Is there a good way of doing this?

Ah, sorry, I was thinking of the wrong test data! All good.