Ejemplo n.º 1
0
    def test_29_set_lines(self):
        """Set crontab lines directly"""
        cron = CronTab(tab='')
        cron.lines = [
            str(self.crontab.lines[5]),
        ]
        self.assertEqual(str(cron), '\n*/30 * * * * firstcommand\n')

        with self.assertRaises(AttributeError):
            cron.crons = ['A']
Ejemplo n.º 2
0
    def test_29_set_lines(self):
        """Set crontab lines directly"""
        cron = CronTab(tab='')
        cron.lines = [
            str(self.crontab.lines[5]),
        ]
        self.assertEqual(str(cron), '\n*/30 * * * * firstcommand\n')

        with self.assertRaises(AttributeError):
            cron.crons = ['A']