~james-w/udd/management-commands

« back to all changes in this revision

Viewing changes to udd/tests/test_logrotate.py

  • Committer: James Westby
  • Date: 2011-12-13 21:09:23 UTC
  • mfrom: (557.1.1 drop_email_failures)
  • Revision ID: james.westby@canonical.com-20111213210923-tfrirlx3xbwmi70u
Merged drop_email_failures into management-commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from udd import tests
 
2
 
 
3
from udd.scripts import logrotate
 
4
 
 
5
 
 
6
class TestLogrotate(tests.TestCaseWithConfig):
 
7
 
 
8
    def test_empty(self):
 
9
        logrotate.main()
 
10
        log_conf_path = 'logs/driver/logrotate.conf'
 
11
        self.assertTestPathExists(log_conf_path)
 
12
        with open(log_conf_path) as f:
 
13
            # Checking that the right path have been expanded by relying just
 
14
            # on the dir used.
 
15
            self.assertContainsRe(f.read(), self.test_dir)