Permalink
Browse files

Fix for daily backup schedule

  • Loading branch information...
1 parent 2aba72c commit beb39958f84d43626fc05c330c357ecc6c9ece65 @rvoicilas rvoicilas committed Oct 31, 2012
Showing with 12 additions and 1 deletion.
  1. +11 −0 tests/test_dotdict.py
  2. +1 −1 vaporize/servers.py
View
11 tests/test_dotdict.py
@@ -0,0 +1,11 @@
+import unittest
+
+from vaporize.servers import BackupSchedule
+
+
+class TestBackupSchedule(unittest.TestCase):
+ def test_to_dict(self):
+ bs = BackupSchedule.create(daily='test')
+ bs_dict = bs.to_dict()
+ self.assertIn('daily', bs_dict['backupSchedule'])
+ self.assertEqual('test', bs_dict['backupSchedule']['daily'])
View
2 vaporize/servers.py
@@ -47,7 +47,7 @@ def to_dict(self):
if self.weekly:
ret['backupSchedule']['weekly'] = self.weekly
if self.daily:
- self['backupSchedule']['daily'] = daily
+ ret['backupSchedule']['daily'] = self.daily
return ret

0 comments on commit beb3995

Please sign in to comment.