def test_get_accessible_log_path(self):
        """ Test suite for get_accessible_log_path method """

        path = qs_logger.get_accessible_log_path(qs_logger.get_accessible_log_path("reservation_id", "handler_name"))
        self.assertTrue(
            re.search(r"Logs[\\/]reservation_id[\\/]handler_name--\d{2}-\w+-\d{4}--\d{2}-\d{2}-\d{2}\.log", path)
        )
    def test_get_accessible_log_path_log_path_setting_missing(self):
        """ Test suite for get_accessible_log_path method """

        if "LOG_PATH" in os.environ:
            del os.environ["LOG_PATH"]
        qs_logger.get_settings = cut_settings
        self.assertIsNone(qs_logger.get_accessible_log_path())
    def test_get_accessible_log_path_log_path_is_none(self):
        """ Test suite for get_accessible_log_path method """

        if "LOG_PATH" in os.environ:
            del os.environ["LOG_PATH"]
        qs_logger.get_settings = wrong_settings
        self.assertIsNone(qs_logger.get_accessible_log_path())
示例#4
0
 def test_get_accessible_log_path(self):
     """Test suite for get_accessible_log_path method."""
     path = qs_logger.get_accessible_log_path("reservation_id",
                                              "handler_name")
     self.assertRegexpMatches(
         path,
         r"Logs[\\/]reservation_id[\\/](.*[\\/])?"
         r"handler_name--\d{2}-\w+-\d{4}--\d{2}-\d{2}-\d{2}\.log",
     )
示例#5
0
 def test_get_accessible_log_path_default_params(self):
     """Test suite for get_accessible_log_path method."""
     path = qs_logger.get_accessible_log_path()
     self.assertRegexpMatches(
         path,
         r"Logs[\\/]Autoload[\\/](.*[\\/])?default--\d{2}-\w+-\d{4}--"
         r"\d{2}-\d{2}-\d{2}\.log",
     )
     self.assertTrue(os.path.dirname(path))
    def test_get_accessible_log_path(self):
        """ Test suite for get_accessible_log_path method """

        path = qs_logger.get_accessible_log_path(qs_logger.get_accessible_log_path("reservation_id", "handler_name"))
        self.assertTrue(re.search(r"Logs[\\/]reservation_id[\\/]handler_name--\d{2}-\w+-\d{4}--\d{2}-\d{2}-\d{2}\.log", path))
    def test_get_accessible_log_path_path_creation(self):
        """ Test suite for get_accessible_log_path method """

        path = qs_logger.get_accessible_log_path()
        self.assertTrue(os.path.dirname(path))
    def test_get_accessible_log_path_default_params(self):
        """ Test suite for get_accessible_log_path method """

        path = qs_logger.get_accessible_log_path()
        self.assertTrue(re.search(r"Logs[\\/]Autoload[\\/]default--\d{2}-\w+-\d{4}--\d{2}-\d{2}-\d{2}\.log", path))
        self.assertTrue(os.path.dirname(path))
    def test_get_accessible_log_path_path_creation(self):
        """ Test suite for get_accessible_log_path method """

        path = qs_logger.get_accessible_log_path()
        self.assertTrue(os.path.dirname(path))
    def test_get_accessible_log_path_default_params(self):
        """ Test suite for get_accessible_log_path method """

        path = qs_logger.get_accessible_log_path()
        self.assertTrue(re.search(r"Logs[\\/]Autoload[\\/]default--\d{2}-\w+-\d{4}--\d{2}-\d{2}-\d{2}\.log", path))
        self.assertTrue(os.path.dirname(path))