コード例 #1
0
 def test_tree_metric_results(self):
     tree_metric_result = TreeMetricResultFactory.build()
     response = {'tree_metric_results': [tree_metric_result._asdict()]}
     with patch.object(self.subject, 'request',
                       return_value=response) as tree_metric_results_request:
         tree_metric_results = self.subject.tree_metric_results()
         assert_equal(tree_metric_results, [tree_metric_result])
         tree_metric_results_request.assert_called_once_with(
             action=":id/metric_results", params={"id": self.subject.id},
             method="get")
コード例 #2
0
 def setUp(self):
     self.subject = TreeMetricResultFactory.build()