'ConditionalGetMiddleware shouldn\'t return a conditional response on an
unsafe request. A response has already been generated by the time
ConditionalGetMiddleware is called, so it\'s too late to return a 412
Precondition Failed.'

def test_no_unsafe(self):

    get_response = ConditionalGetMiddleware().process_response(self.req, self.resp)
    etag = get_response['ETag']
    put_request = RequestFactory().put('/', HTTP_IF_MATCH=etag)
    put_response = HttpResponse(status=200)
    conditional_get_response = ConditionalGetMiddleware().process_response(put_request, put_response)
    self.assertEqual(conditional_get_response.status_code, 200)
