Ejemplo n.º 1
0
    def test_get_metrics_completed(self, sample_build):
        sample_build["status"] = "success"
        mock_api = MagicMock()
        build = Build(sample_build, mock_api)

        metrics = build.get_metrics()
        assert isinstance(metrics, BuildMetrics)
Ejemplo n.º 2
0
    def test_get_metrics_not_completed(self, sample_build):
        sample_build["status"] = "created"
        build = Build(sample_build, None)

        assert not build.get_metrics()
Ejemplo n.º 3
0
    def test_get_metrics_not_completed(self, sample_build):
        sample_build['status'] = 'created'
        build = Build(sample_build, None)

        assert not build.get_metrics()