Example #1
0
 def test_logfile_generation_path_exists(self):
     log_dir = "temp_log"
     try:
         os.mkdir(log_dir)
     except OSError:
         os.rmdir(log_dir)
         os.mkdir(log_dir)
     log_path = generate_logfile_path(log_dir)
     self.assertEqual(log_path, os.path.join(log_dir, "{}_1000.log".format(self.hostname)))
     os.rmdir(log_dir)
Example #2
0
 def test_logfile_generation_path_exists(self):
     log_dir = "temp_log"
     try:
         os.mkdir(log_dir)
     except OSError:
         os.rmdir(log_dir)
         os.mkdir(log_dir)
     log_path = generate_logfile_path(log_dir)
     self.assertEqual(
         log_path, os.path.join(log_dir,
                                "{}_1000.log".format(self.hostname)))
     os.rmdir(log_dir)
Example #3
0
 def test_logfile_creation_path_doesnt_exist(self):
     log_path = generate_logfile_path()
     self.assertEquals(log_path, "{}_1000.log".format(self.hostname))
Example #4
0
 def test_logfile_creation_path_doesnt_exist(self):
     log_path = generate_logfile_path()
     self.assertEquals(log_path, "{}_1000.log".format(self.hostname))