diff profilemanager/tests/test.py @ 73:1cfd259f74cf

finish dated backups, untested
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 16:30:34 -0700
parents 619f5918b998
children b6bb59b79525
line wrap: on
line diff
--- a/profilemanager/tests/test.py	Fri May 07 16:09:06 2010 -0700
+++ b/profilemanager/tests/test.py	Fri May 07 16:30:34 2010 -0700
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
 import os
+import time
 from profilemanager import ProfileManager
 
 # Get the path to the test profiles.ini file:
@@ -43,6 +44,13 @@
 assert not backups
 # TODO: test the backup with a populated profile
 
+# Test dated backups
+manager.backup('testprofile')
+old_backups = manager.backups('testprofile')[0]
+old_time = int(time.time())
+time.sleep(3)
+manager.backup('testprofile')
+# TODO: test with alternate forms of date
 
 # Cleanup:
 manager.remove('testprofile')