Use keyword arguments when there are defaults, e.g

    response = self.client.patch(url, data=data, content_type='application/json')

Also, remember spaces after arguments.