Skip to content

Instantly share code, notes, and snippets.

@adiroiban
Created August 7, 2013 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adiroiban/6175617 to your computer and use it in GitHub Desktop.
Save adiroiban/6175617 to your computer and use it in GitHub Desktop.
class TestUser(object):
"""
An object storing all user information.
"""
def __init__(self, name, uid=None, gid=None, home_path=None,
home_group=None, shell=None, shadow=None, password=None,
domain=None, pdc=None):
if home_path is None:
home_path = u'/tmp'
if shell is None:
shell = u'/bin/sh'
if shadow is None:
shadow = '!'
if gid is None:
gid = uid
if pdc is None:
pdc = ChevahTestCase.getHostname()
self.name = name
self.uid = uid
self.gid = gid
self.home_path = home_path
self.home_group = home_group
self.shell = shell
self.shadow = shadow
self.password = password
self.domain = domain
self.pdc = pdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment