Exemple #1
0
 def setUp(self):
     self.__board = FakeBoard()
     self.__project = domain.Project(
         metric_sources={metric_source.RiskLog: self.__board},
         metric_source_ids={self.__board: 'board_id'})
     self.__metric = metric.RiskLog(project=self.__project,
                                    subject=self.__project)
Exemple #2
0
 def test_multiple_comments(self):
     """ Test that comments are combined. """
     self.__board.ignored = ["Ignored list"]
     project = domain.Project(
         metric_sources={metric_source.RiskLog: self.__board},
         metric_source_ids={self.__board: 'board_id'},
         metric_options={metric.RiskLog: dict(comment="Comment.")})
     risk_log_metric = metric.RiskLog(project=project, subject=project)
     self.assertEqual("Comment. Genegeerde lijsten: Ignored list.",
                      risk_log_metric.comment())
Exemple #3
0
 def setUp(self):
     board = UnreachableBoard()
     project = domain.Project(metric_sources={metric_source.RiskLog: board},
                              metric_source_ids={board: 'board_id'})
     self.__metric = metric.RiskLog(project=project, subject=project)
Exemple #4
0
 def test_value_without_metric_source(self):
     """ Test that the value is -1 when the metric source hasn't been configured. """
     self.assertEqual(-1, metric.RiskLog(project=domain.Project()).value())