def METHOD_NAME(self, environ):
    environ.get.return_value = None
    try:
        getpass.getuser()
    except ImportError: # in case there's no pwd module
        pass
    self.assertEqual(
        environ.get.call_args_list,
        [mock.call(x) for x in ('LOGNAME', 'USER', 'LNAME', 'USERNAME')])