def METHOD_NAME(self, mock_request):
    OpenStackBaseConnection.conn_class._raw_data = ""
    OpenStackBaseConnection.default_content_type = "application/json"
    expected_response = Mock()
    mock_request.return_value = expected_response
    response = self.connection.request(
        "/path", data="somedata", headers={"h1": "v1"}, method="POST"
    )
    self.assertEqual(response, expected_response)
    mock_request.assert_called_with(
        action="/path",
        params={},
        data="somedata",
        method="POST",
        headers={"h1": "v1", "Content-Type": "application/json"},
        raw=False,
    )