title: testing a function which takes input from user (python)
body: <p>The function below takes password from user. I need to test this using Unit testing/(mocks).</p>
  
  <pre><code>def create_auth():
      username = '{user}'.format(user=getpass.getuser())
      pwd = getpass.getpass()
      auth_string = '{username}:{pwd}'.format(username=username, pwd=pwd)
      return auth_string
  </code></pre>
  
  <p>i am new to python, any hint would be helpful</p>
  
  <p>Thanks</p>