Revert tests.
Chris Pressey
4 years ago
56 | 56 | main(['backup.json', 'syncdirs', 'canonical', 'cache']) |
57 | 57 | self.assertFalse(os.path.exists('cache/thing')) |
58 | 58 | output = sys.stdout.getvalue() |
59 | self.assertEqual(output.split('\n')[0], 'rsync --dry-run --archive --verbose --delete --checksum "canonical/" "cache/"') | |
59 | self.assertEqual(output.split('\n')[0], 'rsync --dry-run --archive --verbose --delete "canonical/" "cache/"') | |
60 | 60 | self.assertIn('DRY RUN', output) |
61 | 61 | |
62 | 62 | def test_apply(self): |
64 | 64 | self.assertTrue(os.path.exists('cache/thing')) |
65 | 65 | output = sys.stdout.getvalue() |
66 | 66 | self.assertEqual(output.split('\n')[:4], [ |
67 | 'rsync --archive --verbose --delete --checksum "canonical/" "cache/"', | |
67 | 'rsync --archive --verbose --delete "canonical/" "cache/"', | |
68 | 68 | 'sending incremental file list', |
69 | 69 | 'thing', |
70 | 70 | '' |
74 | 74 | main(['backup.json', 'sync', 'basic:', '--apply']) |
75 | 75 | output = sys.stdout.getvalue() |
76 | 76 | self.assertEqual(output.split('\n')[:4], [ |
77 | 'rsync --archive --verbose --delete --checksum "canonical/" "cache/"', | |
77 | 'rsync --archive --verbose --delete "canonical/" "cache/"', | |
78 | 78 | 'sending incremental file list', |
79 | 79 | 'thing', |
80 | 80 | '' |