Using CSRF header only?

2017-04-13 Thread Grant Means
We have a SPA that will be served from a separate domain than the API backend. The SPA posts to an authenticate endpoint and receives a token.That view is setting the CSRF token for me as follows: class Authenticate(APIView): throttle_classes = () authentication_classes = () permissi

Testing Signals

2015-08-11 Thread Grant Means
I have an app that fires a custom signal when a specific method is called. I wrote a test that connects to the signal in setUp() and uses a local listener function to set a class attribute to True if the handler is called. You can see the relevant code here: https://dpaste.de/mAGw This works f