comparison profilemanager/tests/test.py @ 72:619f5918b998

add a test to ensure the backup is gone
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 16:09:06 -0700
parents 6cb674db8f51
children 1cfd259f74cf
comparison
equal deleted inserted replaced
71:494ea3c2f578 72:619f5918b998
37 backups = manager.backups('testprofile') 37 backups = manager.backups('testprofile')
38 assert len(backups) == 1, "Expected one backup, instead got %d" % len(backups) 38 assert len(backups) == 1, "Expected one backup, instead got %d" % len(backups)
39 assert backups[0][0].startswith('testprofile') 39 assert backups[0][0].startswith('testprofile')
40 manager.restore('testprofile') 40 manager.restore('testprofile')
41 manager.restore('testprofile', delete=True) 41 manager.restore('testprofile', delete=True)
42 backups = manager.backups('testprofile')
43 assert not backups
44 # TODO: test the backup with a populated profile
45
42 46
43 # Cleanup: 47 # Cleanup:
44 manager.remove('testprofile') 48 manager.remove('testprofile')
45 assert manager.list() == [] 49 assert manager.list() == []
46 f = file(profiles, 'w') 50 f = file(profiles, 'w')