def getap(client_ip='<STR_LIT>', command='<STR_LIT>',<EOL>logfile=None, configfile=None, configdir=None,<EOL>**ap_args):
<EOL>os.environ['<STR_LIT>'] = '<STR_LIT>' % client_ip<EOL>os.environ['<STR_LIT>'] = '<STR_LIT>' % client_ip<EOL>os.environ.pop('<STR_LIT>', None)<EOL>if command:<EOL><INDENT>os.environ['<STR_LIT>'] = command<EOL><DEDENT>if not configfile:<EOL><INDENT>configfile = os.path.join(<EOL>os.path.dirname(__file__),<EOL>'<STR_LIT>',<EOL>'<STR_LIT>')<EOL><DEDENT>if not configdir:<EOL><INDENT>configdir = os.path.join(<EOL>os.path.dirname(__file__),<EOL>'<STR_LIT>',<EOL>'<STR_LIT>')<EOL><DEDENT>ap = authprogs.AuthProgs(<EOL>logfile=logfile,<EOL>configdir=configdir,<EOL>configfile=configfile,<EOL>**ap_args)<EOL>return ap<EOL>
Create a unittestable object.