def test_JsonFetcher_decodes_enum_events_correctly(dummy_pv, json_fetcher):
    enum_json = utils.load_from_file('enum_event.json')
    mock_response = utils.mock_response(json_str=enum_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.enum_options[5] == 'Special')
    assert (aa_data.enum_strings[0] == 'User')
    assert (aa_data[0].enum_string[0] == 'User')
    assert (aa_data.values[0] == 4)
def test_JsonFetcher_decodes_enum_events_correctly(dummy_pv, json_fetcher):
    enum_json = utils.load_from_file('enum_event.json')
    mock_response = utils.mock_response(json_str=enum_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.enum_options[5] == 'Special')
    assert (aa_data.enum_strings[0] == 'User')
    assert (aa_data[0].enum_string[0] == 'User')
    assert (aa_data.values[0] == 4)