def test_report_include_partial_frames(mocker, watson, date_as_unixtime,
                                       include_partial, sum_):
    """Test report building with frames that cross report boundaries

    1 event is added that has 2 hours in one day and 1 in the next. The
    parametrization checks that the report for both days is empty with
    `include_partial=False` and report the correct amount of hours with
    `include_partial=False`

    """
    content = json.dumps([[
        3600 * 46,
        3600 * 49,
        "programming",
        "3e76c820909840f89cabaf106ab7d12a",
        ["cli"],
        1548797432
    ]])
    mocker.patch('builtins.open', mocker.mock_open(read_data=content))
    date = arrow.get(date_as_unixtime)
    report = watson.report(
        from_=date, to=date, include_partial_frames=include_partial,
    )
    assert report["time"] == pytest.approx(sum_, abs=1e-3)
Test report building with frames that cross report boundaries

    1 event is added that has 2 hours in one day and 1 in the next. The
    parametrization checks that the report for both days is empty with
    `include_partial=False` and report the correct amount of hours with
    `include_partial=False`

    
tests/test_watson.py