Mercurial > mozilla > hg > ProfileManager
view profilemanager/tests/test_profilemanager.txt @ 15:543d08958b67
actually sample 8 random lowercase letters and numbers for the profile hash
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 May 2010 11:06:59 -0700 |
parents | e846544b4d92 |
children | 4a1815f8d146 |
line wrap: on
line source
Test ProfileManager =================== The obligatory imports: >>> import os >>> from profilemanager import ProfileManager Get the path to the test profiles.ini file: >>> from pkg_resources import resource_filename >>> path = os.path.join('tests', 'profiles', 'profiles.ini') >>> profiles = resource_filename('profilemanager', path) Instatiate a ProfileManager: >>> manager = ProfileManager(profiles) Create a new profile: >>> manager.new('testprofile')