'Helper method for sending a PUT to the server. Verifies the expected status and returns the response.'

def send_put(self, client, json_data, content_type='application/json', expected_status=204):

    response = client.put(self.url, data=json.dumps(json_data), content_type=content_type)
    self.assertEqual(expected_status, response.status_code)
    return response
