title: How can I simulate a ParameterNotFound boto3 exception in my unit test?
body: <p>I want to test some error handling logic, so I want to simulate a the specific exception type in my unit test.  I am mocking the call to boto3, but I want to make that mock to raise a <code>ParameterNotFound</code> exception.  The code I am testing <a href="https://stackoverflow.com/a/50958676/230055">follows this pattern</a>:</p>
  
  <pre><code>boto3_client = boto3.client('ssm')
  try:
      temp_var = boto3_client.get_parameter(Name="Something not found")['Parameter']['Value']
  except boto3_client.exceptions.ParameterNotFound:
      ... [logic I want to test]
  </code></pre>
  
  <p>I have created a unittest mock, but I don't know how to make it raise the exception as this ParameterNotFound exception.  I tried the following, but it doesn't work because it gets "exceptions must derive from the base class" when evaluating the except clause:</p>
  
  <pre><code>@patch('patching_config.boto3.client')
  def test_sample(self, mock_boto3_client):
          mock_boto3_client.return_value = mock_boto3_client
  
          def get_parameter_side_effect(**kwargs):
              raise boto3.client.exceptions.ParameterNotFound()
  
          mock_boto3_client.get_parameter.side_effect = get_parameter_side_effect
  </code></pre>
  
  <p>How can I simulate a ParameterNotFound boto3 exception in my unit test?</p>