title: pytest - set environment variables with environment specific values
body: <p>I am using pytest to run tests for my python services that run in AWS.</p>
  
  <p>I am trying to test a service which triggers from an SNS topic. So my test writes to the SNS topic. The topic ARN is different for dev, staging, prod. </p>
  
  <p>In the test I would like to be able to access the topic ARN using the same environment variable and pick up the right topic for each environment. </p>
  
  <pre><code>self.sns_topic_arn = os.environ['SNS_TOPIC']
  </code></pre>
  
  <p>I have a service which does set, build, test which is independent of all my services and deployment environments.</p>
  
  <p>I refer to this discussion on how to pass the env vars <a href="https://stackoverflow.com/questions/36141024/how-to-pass-environment-variables-to-pytest">How to pass environment variables to pytest</a></p>
  
  <p>However I am not able to figure out how to set the value per environment. Is there a template or a best practice?</p>