# Copyright 2021 Xoriant Corporation
-#
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
def getEvent(arg):
path = Path(__file__).parent
fname = path /'events.txt'
-
+
event_dictionary = {}
with fname.open() as file:
for line in file:
key, value = line.split("=")
event_dictionary[key] = value
if key == arg:
- return value
+ return value
return 'NA'
@pytest.fixture
def hb_expected_pdata():
- heartbeat_expected_pdata = 'heartbeat,domain=heartbeat,eventId=ORAN-DEV_2021-12-20T07:29:34.292938Z,eventName=heartbeat_O_RAN_COMPONENT,eventType=O_RAN_COMPONENT,nfNamingCode=SDN-Controller,nfVendorName=O-RAN-SC-OAM,priority=Low,reportingEntityName=ORAN-DEV,sourceName=ORAN-DEV,timeZoneOffset=+00:00,version=4.1,vesEventListenerVersion=7.2.1,system=unknown,eventTime=2021-12-20T07:29:34.292938Z,heartbeatFieldsVersion=3.0 lastEpochMicrosec=1639965574292938,sequence=357,startEpochMicrosec=1639965574292938,heartbeatInterval=20 1639985333218840000'
+ heartbeat_expected_pdata = 'heartbeat,domain=heartbeat,eventId=ORAN-DEV_2021-12-20T07:29:34.292938Z,eventName=heartbeat_O_RAN_COMPONENT,eventType=O_RAN_COMPONENT,nfNamingCode=SDN-Controller,nfVendorName=O-RAN-SC-OAM,priority=Low,reportingEntityName=ORAN-DEV,sourceName=ORAN-DEV,timeZoneOffset=+00:00,version=4.1,vesEventListenerVersion=7.2.1,system=None,eventTime=2021-12-20T07:29:34.292938Z,heartbeatFieldsVersion=3.0 lastEpochMicrosec=1639965574292938,sequence=357,startEpochMicrosec=1639965574292938,heartbeatInterval=20 1639985333218840000'
return heartbeat_expected_pdata
-@mock.patch('influxdb_connector.send_to_influxdb')
-def test_process_heartbeat_events_called(mocker_send_to_influxdb, hb_json, hb_data, hb_nonstringpdata, hb_expected_pdata, event_Timestamp):
+@mock.patch('influxdb_connector.send_to_influxdb')
+@mock.patch('influxdb_connector.process_time', return_value='1639985333218840000')
+def test_process_heartbeat_events_called(mocker_process_time, mocker_send_to_influxdb, hb_json, hb_data, hb_nonstringpdata, hb_expected_pdata, event_Timestamp):
domain = "heartbeat"
-
- influxdb_connector.process_heartbeat_events(domain, hb_json, hb_data, hb_nonstringpdata, event_Timestamp)
+ influxdb_connector.process_heartbeat_events(domain, hb_json, hb_data, hb_nonstringpdata)
mocker_send_to_influxdb.assert_called_with(domain, hb_expected_pdata)
-
-
+
+
# ------------------------------------------------------------------------------
# Address of pnfRegistration event.
# ------------------------------------------------------------------------------
@pytest.fixture
def pnf_expected_pdata():
- pnf_expected_pdata = 'pnfRegistration,domain=pnfRegistration,eventId=ORAN-DEV_ONAP\\ Controller\\ for\\ Radio,eventName=pnfRegistration_EventType5G,eventType=EventType5G,priority=Low,reportingEntityName=ORAN-DEV,sourceName=ORAN-DEV,nfNamingCode=SDNR,nfVendorName=ONAP,timeZoneOffset=+00:00,version=4.1,vesEventListenerVersion=7.2.1,system=unknown,pnfRegistrationFieldsVersion=2.1,lastServiceDate=2021-03-26,macAddress=02:42:f7:d4:62:ce,manufactureDate=2021-01-16,modelNumber=ONAP\\ Controller\\ for\\ Radio,oamV4IpAddress=127.0.0.1,oamV6IpAddress=0:0:0:0:0:ffff:a0a:0.1,serialNumber=ONAP-SDNR-127.0.0.1-ONAP\\ Controller\\ for\\ Radio,softwareVersion=2.3.5,unitFamily=ONAP-SDNR,unitType=SDNR,vendorName=ONAP,oamPort=830,protocol=SSH,username=netconf,password=netconf,reconnectOnChangedSchema=false,sleep-factor=1.5,tcpOnly=false,connectionTimeout=20000,maxConnectionAttempts=100,betweenAttemptsTimeout=2000,keepaliveDelay=120 sequence=0,startEpochMicrosec=1639985329569087,lastEpochMicrosec=1639985329569087 1639985333218840000'
+ pnf_expected_pdata = 'pnfRegistration,domain=pnfRegistration,eventId=ORAN-DEV_ONAP\\ Controller\\ for\\ Radio,eventName=pnfRegistration_EventType5G,eventType=EventType5G,priority=Low,reportingEntityName=ORAN-DEV,sourceName=ORAN-DEV,nfNamingCode=SDNR,nfVendorName=ONAP,timeZoneOffset=+00:00,version=4.1,vesEventListenerVersion=7.2.1,system=None,pnfRegistrationFieldsVersion=2.1,lastServiceDate=2021-03-26,macAddress=02:42:f7:d4:62:ce,manufactureDate=2021-01-16,modelNumber=ONAP\\ Controller\\ for\\ Radio,oamV4IpAddress=127.0.0.1,oamV6IpAddress=0:0:0:0:0:ffff:a0a:0.1,serialNumber=ONAP-SDNR-127.0.0.1-ONAP\\ Controller\\ for\\ Radio,softwareVersion=2.3.5,unitFamily=ONAP-SDNR,unitType=SDNR,vendorName=ONAP,oamPort=830,protocol=SSH,username=netconf,password=netconf,reconnectOnChangedSchema=false,sleep-factor=1.5,tcpOnly=false,connectionTimeout=20000,maxConnectionAttempts=100,betweenAttemptsTimeout=2000,keepaliveDelay=120 sequence=0,startEpochMicrosec=1639985329569087,lastEpochMicrosec=1639985329569087 1639985333218840000'
return pnf_expected_pdata
-@mock.patch('influxdb_connector.send_to_influxdb')
-def test_process_pnfRegistration_event_called(mocker_send_to_influxdb, pnf_json, pnf_data, pnf_nonstringpdata, pnf_expected_pdata, event_Timestamp):
+@mock.patch('influxdb_connector.send_to_influxdb')
+@mock.patch('influxdb_connector.process_time', return_value='1639985333218840000')
+def test_process_pnfRegistration_event_called(mock_process_time ,mocker_send_to_influxdb, pnf_json, pnf_data, pnf_nonstringpdata, pnf_expected_pdata, event_Timestamp):
domain = "pnfRegistration"
-
- influxdb_connector.process_pnfRegistration_event(domain, pnf_json, pnf_data, pnf_nonstringpdata, event_Timestamp)
+
+ influxdb_connector.process_pnfRegistration_event(domain, pnf_json, pnf_data, pnf_nonstringpdata)
mocker_send_to_influxdb.assert_called_with(domain, pnf_expected_pdata)
-
-
+
+
# ------------------------------------------------------------------------------
# Address of fault event unit test case
# ------------------------------------------------------------------------------
@pytest.fixture
def flt_expected_pdata():
- expected_pdata = 'fault,domain=fault,eventId=LKCYFL79Q01M01FYNG01_LP-MWPS-RADIO_TCA,eventName=fault_O_RAN_COMPONENT_Alarms_TCA,eventType=O_RAN_COMPONENT_Alarms,priority=High,reportingEntityName=ORAN-DEV,sourceName=LKCYFL79Q01M01FYNG01,nfNamingCode=FYNG,nfVendorName=VENDORA,timeZoneOffset=+00:00,version=4.1,vesEventListenerVersion=7.2.1,system=unknown,faultFieldsVersion=1.0,alarmCondition=TCA,alarmInterfaceA=LP-MWPS-RADIO,eventSourceType=O_RAN_COMPONENT,specificProblem=TCA,eventSeverity=NORMAL,vfStatus=Active,eventTime=2021-12-20T07:28:53.218840Z,equipType=FYNG,vendor=VENDORA,model=FancyNextGeneration sequence=0,startEpochMicrosec=1639985333218840,lastEpochMicrosec=1639985333218840 1639985333218840000'
+ expected_pdata = 'fault,domain=fault,eventId=LKCYFL79Q01M01FYNG01_LP-MWPS-RADIO_TCA,eventName=fault_O_RAN_COMPONENT_Alarms_TCA,eventType=O_RAN_COMPONENT_Alarms,priority=High,reportingEntityName=ORAN-DEV,sourceName=LKCYFL79Q01M01FYNG01,nfNamingCode=FYNG,nfVendorName=VENDORA,timeZoneOffset=+00:00,version=4.1,vesEventListenerVersion=7.2.1,system=None,faultFieldsVersion=1.0,alarmCondition=TCA,alarmInterfaceA=LP-MWPS-RADIO,eventSourceType=O_RAN_COMPONENT,specificProblem=TCA,eventSeverity=NORMAL,vfStatus=Active,eventTime=2021-12-20T07:28:53.218840Z,equipType=FYNG,vendor=VENDORA,model=FancyNextGeneration sequence=0,startEpochMicrosec=1639985333218840,lastEpochMicrosec=1639985333218840 1639985333218840000'
return expected_pdata
-@mock.patch('influxdb_connector.send_to_influxdb')
-def test_process_fault_event_called(mocker_send_to_influxdb, flt_json, flt_data, flt_nonstringpdata, flt_expected_pdata, event_Timestamp):
+@mock.patch('influxdb_connector.send_to_influxdb')
+@mock.patch('influxdb_connector.process_time', return_value='1639985333218840000')
+def test_process_fault_event_called(mock_time,mocker_send_to_influxdb, flt_json, flt_data, flt_nonstringpdata, flt_expected_pdata, event_Timestamp):
domain = "fault"
-
- influxdb_connector.process_fault_event(domain, flt_json, flt_data, flt_nonstringpdata, event_Timestamp)
+
+ influxdb_connector.process_fault_event(domain, flt_json, flt_data, flt_nonstringpdata)
mocker_send_to_influxdb.assert_called_with(domain, flt_expected_pdata)
-
-
+
+
# ------------------------------------------------------------------------------
# Address of measurement event unit test_cases
# ------------------------------------------------------------------------------
@pytest.fixture
def meas_json():
- jobj = {'additionalFields': {}, 'additionalMeasurements': [{'name': 'LP-MWPS-RADIO-1', 'hashMap': {'es':
+ jobj = {'additionalFields': {}, 'additionalMeasurements': [{'name': 'LP-MWPS-RADIO-1', 'hashMap': {'es':
'0', 'ses': '1', 'cses': '0', 'unavailability': '0'}}, {'name': 'LP-MWPS-RADIO-2', 'hashMap': {'es': '0', 'ses': '1',
'cses': '0', 'unavailability': '0'}}], 'additionalObjects': [], 'codecUsageArray': [], 'concurrentSessions': 2,
'configuredEntities': 2, 'cpuUsageArray': [], 'diskUsageArray': [], 'featureUsageArray': {'https://www.itu.int/rec/T-REC-G.841': 'true'}, 'filesystemUsageArray': [], 'hugePagesArray': [], 'ipmi': {},
@pytest.fixture
def add_meas_data():
- data_set = {'additionalMeasurements': [{'name': 'LP-MWPS-RADIO-1', 'hashMap': {'es':
+ data_set = {'additionalMeasurements': [{'name': 'LP-MWPS-RADIO-1', 'hashMap': {'es':
'0', 'ses': '1', 'cses': '0', 'unavailability': '0'}}, {'name': 'LP-MWPS-RADIO-2', 'hashMap': {'es': '0', 'ses': '1',
'cses': '0', 'unavailability': '0'}}]}
return data_set
@pytest.fixture
def non_add_meas_data():
- data_set = {'measurementcpuusage': [{'name': 'LP-MWPS-RADIO-1', 'hashMap': {'es':
+ data_set = {'measurementcpuusage': [{'name': 'LP-MWPS-RADIO-1', 'hashMap': {'es':
'0', 'ses': '1', 'cses': '0', 'unavailability': '0'}}, {'name': 'LP-MWPS-RADIO-2', 'hashMap': {'es': '0', 'ses': '1',
'cses': '0', 'unavailability': '0'}}]}
return data_set
@pytest.fixture
def meas_expected_data():
- measurement_expected_pdata = 'measurement,domain=measurement,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,eventName=measurement_O_RAN_COMPONENT_PM15min,eventType=O_RAN_COMPONENT_PM15min,priority=Low,reportingEntityName=ORAN-DEV,sourceName=O-RAN-FH-IPv6-01,intervalStartTime=Mon\\,\\ 20\\ Dec\\ 2021\\ 07:00:00\\ +0000,intervalEndTime=Mon\\,\\ 20\\ Dec\\ 2021\\ 07:15:00\\ +0000,version=4.1,vesEventListenerVersion=7.2.1,system=unknown,https://www.itu.int/rec/T-REC-G.841=true,measurementFieldsVersion=4.0 sequence=0,startEpochMicrosec=1639983600000,lastEpochMicrosec=1639984500000,concurrentSessions=2,configuredEntities=2,meanRequestLatency=1000,measurementInterval=234,numberOfMediaPortsInUse=234,requestRate=23,nfcScalingMetric=3 1639985333218840000'
+ measurement_expected_pdata = 'measurement,domain=measurement,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,eventName=measurement_O_RAN_COMPONENT_PM15min,eventType=O_RAN_COMPONENT_PM15min,priority=Low,reportingEntityName=ORAN-DEV,sourceName=O-RAN-FH-IPv6-01,intervalStartTime=Mon\\,\\ 20\\ Dec\\ 2021\\ 07:00:00\\ +0000,intervalEndTime=Mon\\,\\ 20\\ Dec\\ 2021\\ 07:15:00\\ +0000,version=4.1,vesEventListenerVersion=7.2.1,system=None,https://www.itu.int/rec/T-REC-G.841=true,measurementFieldsVersion=4.0 sequence=0,startEpochMicrosec=1639983600000,lastEpochMicrosec=1639984500000,concurrentSessions=2,configuredEntities=2,meanRequestLatency=1000,measurementInterval=234,numberOfMediaPortsInUse=234,requestRate=23,nfcScalingMetric=3 1639985333218840000'
return measurement_expected_pdata
-
+
# ## process_measurement_events unit test_cases.
@patch('influxdb_connector.process_nonadditional_measurements')
@patch('influxdb_connector.process_additional_measurements')
@patch('influxdb_connector.send_to_influxdb')
-def test_process_measurement_events_called(mocker_send_to_influxdb, mocker_additional, mocker_nonadditional, meas_json,
+@mock.patch('influxdb_connector.process_time', return_value='1639985333218840000')
+def test_process_measurement_events_called(mock_time,mocker_send_to_influxdb, mocker_additional, mocker_nonadditional, meas_json,
meas_data, meas_nonstringpdata, event_Id, start_Epoch_Microsec, last_Epoch_Microsec,
meas_expected_data, non_add_meas_data, add_meas_data, event_Timestamp):
domain = "measurement"
-
+
influxdb_connector.process_measurement_events('measurement', meas_json, meas_data, meas_nonstringpdata, event_Id,
- start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
+ start_Epoch_Microsec, last_Epoch_Microsec)
mocker_additional.process_additional_measurements(add_meas_data.get('additionalMeasurements'), 'measurementadditionalmeasurements',
- event_Id, start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
+ event_Id, start_Epoch_Microsec, last_Epoch_Microsec)
mocker_additional.assert_called_with(add_meas_data.get('additionalMeasurements'), 'measurementadditionalmeasurements', event_Id,
- start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
-
- mocker_nonadditional.process_nonadditional_measurements([], 'measurementnicperformance', event_Id, start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
- mocker_nonadditional.assert_called_with([], 'measurementnicperformance', event_Id, start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
+ start_Epoch_Microsec, last_Epoch_Microsec)
+
+ mocker_nonadditional.process_nonadditional_measurements([], 'measurementnicperformance', event_Id, start_Epoch_Microsec, last_Epoch_Microsec)
+ mocker_nonadditional.assert_called_with([], 'measurementnicperformance', event_Id, start_Epoch_Microsec, last_Epoch_Microsec)
mocker_send_to_influxdb.assert_called_with(domain, meas_expected_data)
@pytest.fixture
def add_meas_expected_pdata():
- additional_expected_pdata = 'measurementadditionalmeasurements,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,system=unknown,name=LP-MWPS-RADIO-2,es=0,ses=1,cses=0,unavailability=0 startEpochMicrosec=1639983600000,lastEpochMicrosec=1639984500000 1639985333218840000'
+ additional_expected_pdata = 'measurementadditionalmeasurements,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,system=None,name=LP-MWPS-RADIO-2,es=0,ses=1,cses=0,unavailability=0 startEpochMicrosec=1639983600000,lastEpochMicrosec=1639984500000 1639985333218840000'
return additional_expected_pdata
# ## process_additional_measurements unit test_case
@mock.patch('influxdb_connector.send_to_influxdb')
-def test_process_additional_measurements_called(mocker_send_to_influxdb, event_Id, start_Epoch_Microsec, last_Epoch_Microsec,
+@mock.patch('influxdb_connector.process_time', return_value='1639985333218840000')
+def test_process_additional_measurements_called(mock_time, mocker_send_to_influxdb, event_Id, start_Epoch_Microsec, last_Epoch_Microsec,
add_meas_data, add_meas_expected_pdata, event_Timestamp):
payload = add_meas_data
domain = 'measurementadditionalmeasurements'
-
for key, val in payload.items():
if isinstance(val, list):
if key == 'additionalMeasurements':
- influxdb_connector.process_additional_measurements(payload.get('additionalMeasurements'), domain,
- event_Id, start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
+ influxdb_connector.process_additional_measurements(payload.get('additionalMeasurements'), domain,
+ event_Id, start_Epoch_Microsec, last_Epoch_Microsec)
mocker_send_to_influxdb.assert_called_with(domain, add_meas_expected_pdata)
@pytest.fixture
def non_add_expected_data():
- non_additional_expected_pdata = "measurementcpuusage,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,system=unknown,name=LP-MWPS-RADIO-2 startEpochMicrosec=1639983600000,lastEpochMicrosec=1639984500000,hashMap={'es': '0', 'ses': '1', 'cses': '0', 'unavailability': '0'} 1639985333218840000"
+ non_additional_expected_pdata = "measurementcpuusage,eventId=O-RAN-FH-IPv6-01_1639984500_PM15min,system=None,name=LP-MWPS-RADIO-2 startEpochMicrosec=1639983600000,lastEpochMicrosec=1639984500000,hashMap={'es': '0', 'ses': '1', 'cses': '0', 'unavailability': '0'} 1639985333218840000"
return non_additional_expected_pdata
# ## process_nonadditional_measurements unit test_cases.
@mock.patch('influxdb_connector.send_to_influxdb')
-def test_process_nonadditional_measurements_called(mocker_send_to_influxdb, event_Id, start_Epoch_Microsec,
+@mock.patch('influxdb_connector.process_time', return_value='1639985333218840000')
+def test_process_nonadditional_measurements_called(mock_time, mocker_send_to_influxdb, event_Id, start_Epoch_Microsec,
last_Epoch_Microsec, non_add_meas_data, non_add_expected_data, event_Timestamp):
domain = 'measurementcpuusage'
-
- influxdb_connector.process_nonadditional_measurements(non_add_meas_data.get('measurementcpuusage'), domain, event_Id,
- start_Epoch_Microsec, last_Epoch_Microsec, event_Timestamp)
+ source = 'unkown'
+
+ influxdb_connector.process_nonadditional_measurements(non_add_meas_data.get('measurementcpuusage'), domain, event_Id,
+ start_Epoch_Microsec, last_Epoch_Microsec)
mocker_send_to_influxdb.assert_called_with(domain, non_add_expected_data)
@pytest.fixture
def thre_json():
- jobj = {'thresholdCrossingFieldsVersion': '4.0', 'additionalParameters': [{'criticality': 'MAJ', 'hashMap':
+ jobj = {'thresholdCrossingFieldsVersion': '4.0', 'additionalParameters': [{'criticality': 'MAJ', 'hashMap':
{'additionalProperties': 'up-and-down'}, 'thresholdCrossed': 'packetLoss'}], 'alertAction': 'SET',
'alertDescription': 'TCA', 'alertType': 'INTERFACE-ANOMALY', 'alertValue': '1OSF',
'associatedAlertIdList': ['loss-of-signal'], 'collectionTimestamp': 'Mon, 20 Dec 2021 07:28:56 +0000',
- 'dataCollector': 'data-lake', 'elementType': '1OSF', 'eventSeverity': 'WARNING', 'eventStartTimestamp':
+ 'dataCollector': 'data-lake', 'elementType': '1OSF', 'eventSeverity': 'WARNING', 'eventStartTimestamp':
'Mon, 20 Dec 2021 07:15:00 +0000', 'interfaceName': '', 'networkService': 'from-a-to-b',
'possibleRootCause': 'always-the-others', 'additionalFields': {'eventTime': '2021-12-20T07:28:56.443218Z',
'equipType': '1OSF', 'vendor': '', 'model': ''}}
def test_process_thresholdCrossingAlert_event_called(thre_json, threshold_data, thres_nonstringpdata, event_Timestamp):
domain = "thresholdCrossingAlert"
-
+
with patch('influxdb_connector.process_thresholdCrossingAlert_event') as func:
- influxdb_connector.process_thresholdCrossingAlert_event(domain, thre_json, threshold_data, thres_nonstringpdata, event_Timestamp)
- func.assert_called_with(domain, thre_json, threshold_data, thres_nonstringpdata, event_Timestamp)
+ influxdb_connector.process_thresholdCrossingAlert_event(domain, thre_json, threshold_data, thres_nonstringpdata)
+ func.assert_called_with(domain, thre_json, threshold_data, thres_nonstringpdata)
# ## save_event_in_db unit test_cases.
meas_json, meas_data, meas_nonstringpdata, event_Id, start_Epoch_Microsec, last_Epoch_Microsec,
flt_json, flt_data, flt_nonstringpdata,
thre_json, threshold_data, thres_nonstringpdata):
-
+
if(key == 'heartbeat'):
data_set = getEvent("heartbeat")
with patch('influxdb_connector.process_heartbeat_events') as func:
influxdb_connector.save_event_in_db(data_set)
- func.assert_called_with('heartbeat', hb_json, hb_data, hb_nonstringpdata, int(1639965574292938))
-
+ func.assert_called_with('heartbeat', hb_json, hb_data, hb_nonstringpdata)
+
elif(key == 'pnfRegistration'):
data_set = getEvent("pnfRegistration")
with patch('influxdb_connector.process_pnfRegistration_event') as func:
- influxdb_connector.save_event_in_db(data_set)
- func.assert_called_with('pnfRegistration', pnf_json, pnf_data, pnf_nonstringpdata, int(1639985329569087))
-
+ influxdb_connector.save_event_in_db(data_set)
+ func.assert_called_with('pnfRegistration', pnf_json, pnf_data, pnf_nonstringpdata)
+
elif(key == 'measurement'):
data_set = getEvent("measurement")
with patch('influxdb_connector.process_measurement_events') as func:
- influxdb_connector.save_event_in_db(data_set)
- func.assert_called_with('measurement', meas_json, meas_data, meas_nonstringpdata, event_Id, int(start_Epoch_Microsec),
- int(last_Epoch_Microsec), int(start_Epoch_Microsec))
-
+ influxdb_connector.save_event_in_db(data_set)
+ func.assert_called_with('measurement', meas_json, meas_data, meas_nonstringpdata, event_Id, int(start_Epoch_Microsec),
+ int(last_Epoch_Microsec))
+
elif(key == 'fault'):
data_set = getEvent("fault")
with patch('influxdb_connector.process_fault_event') as func:
- influxdb_connector.save_event_in_db(data_set)
- func.assert_called_with('fault', flt_json, flt_data, flt_nonstringpdata, int(1639985333218840))
-
+ influxdb_connector.save_event_in_db(data_set)
+ func.assert_called_with('fault', flt_json, flt_data, flt_nonstringpdata)
+
elif(key == 'thresholdCrossingAlert'):
data_set = getEvent("thresholdCrossingAlert")
with patch('influxdb_connector.process_thresholdCrossingAlert_event') as func:
influxdb_connector.save_event_in_db(data_set)
- func.assert_called_with('thresholdCrossingAlert', thre_json, threshold_data, thres_nonstringpdata, int(1639985336443218))
-
+ func.assert_called_with('thresholdCrossingAlert', thre_json, threshold_data, thres_nonstringpdata)
+