Ejemplo n.º 1
0
def test_has_valid_aggregates(interval):
    project = None  # parameter is unused

    def make_report(aggregates):
        return Report(None, aggregates, None, None, None, None)

    assert has_valid_aggregates(interval, (project, make_report([None] * 4))) is False

    assert has_valid_aggregates(interval, (project, make_report([0] * 4))) is False

    assert has_valid_aggregates(interval, (project, make_report([1, 0, 0, 0]))) is True
Ejemplo n.º 2
0
def test_has_valid_aggregates(interval):
    project = None  # parameter is unused

    def make_report(aggregates):
        return Report(None, aggregates, None, None, None)

    assert has_valid_aggregates(interval, (project, make_report([None] * 4))) is False

    assert has_valid_aggregates(interval, (project, make_report([0] * 4))) is False

    assert has_valid_aggregates(interval, (project, make_report([1, 0, 0, 0]))) is True