def test_JsonFetcher_decodes_waveform_events_correctly(dummy_pv, json_fetcher, data_2d_2_events):
    waveform_json = utils.load_from_file('waveform.json')
    mock_response = utils.mock_response(json_str=waveform_json)
    json_fetcher._fetch_data = mock.MagicMock(return_value=mock_response)
    aa_data = json_fetcher.get_values(dummy_pv, EARLY_DATE, LATE_DATE)
    assert (aa_data == data_2d_2_events)
def test_JsonFetcher_decodes_waveform_events_correctly(dummy_pv, json_fetcher, data_2d_2_events):
    waveform_json = utils.load_from_file('waveform.json')
    mock_response = utils.mock_response(json_str=waveform_json)
    json_fetcher._fetch_data = mock.MagicMock(return_value=mock_response)
    aa_data = json_fetcher.get_values(dummy_pv, EARLY_DATE, LATE_DATE)
    assert (aa_data == data_2d_2_events)