예제 #1
0
 def test_tasks_output_dir(self):
     self.write_ubuntu_structure()
     output = GerminateOutput(self.config, self.temp_dir)
     self.config["DIST"] = "trusty"
     self.config["IMAGE_TYPE"] = "daily"
     self.assertEqual(
         os.path.join(self.temp_dir, "scratch", "ubuntu", "trusty", "daily",
                      "tasks"), output.tasks_output_dir("ubuntu"))
예제 #2
0
 def test_update_tasks_no_recipients(self, mock_diff_tasks, mock_send_mail):
     self.write_ubuntu_structure()
     self.config["PROJECT"] = "ubuntu"
     self.config["DIST"] = "raring"
     self.config["IMAGE_TYPE"] = "daily-live"
     output = GerminateOutput(self.config, self.temp_dir)
     os.makedirs(output.tasks_output_dir("ubuntu"))
     output.update_tasks("20130319")
     self.assertEqual(0, mock_send_mail.call_count)
     task_mail_path = os.path.join(self.temp_dir, "etc", "task-mail")
     touch(task_mail_path)
     output.update_tasks("20130319")
     self.assertEqual(0, mock_send_mail.call_count)