def test_widget_data(server):
    with metrics_enabled({'TotalLinesOfCode': {}}):
        response = server.client.post(
            flask.url_for('widget.data'),
            data={
                'diff': file_diff_stat_test.SAMPLE_OUTPUT
            }
        )
    response_pq = pyquery.PyQuery(response.json['metrics'])
    assert 'TotalLinesOfCode 1' in response_pq.text()
    # Should not find any metrics with no data
    assert not response_pq.find('.metric-none')
    # Should not have metrics we didn't specify
    assert response_pq.text() not in 'TotalLinesOfCode_Text'
dataset/ETHPy150Open Yelp/git-code-debt/tests/server/servlets/widget_test.py/test_widget_data/swapped operands of `not in`