# ==================================================================================
#       Copyright (c) 2020 HCL Technologies Limited.
#
#   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
#
#          http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
# ==================================================================================
from ad import main
from ricxappframe.xapp_frame import Xapp
from contextlib import suppress
import os
from ad.ad_train import train
import json


def test_RFtrainmodel(monkeypatch):
    if not os.path.isfile('ad/RF'):
        train()


def test_predict_anomaly(monkeypatch):
    main.predict_anomaly('test')


def test_msg_to_ts(monkeypatch, ad_to_ts):

    def mock_ad_entry(self):
        val = json.dumps(ad_to_ts).encode()
        self.rmr_send(val, 30003)
    global mock_ad_xapp
    mock_ad_xapp = Xapp(entrypoint=mock_ad_entry, rmr_port=4564, use_fake_sdl=True)
    mock_ad_xapp.run()  # this will return since mock_ad_entry isn't a loop  # this will return since mock_ad_entry isn't a loop


def teardown_module():
    """
    this is like a "finally"; the name of this function is pytest magic
    safer to put down here since certain failures above can lead to pytest never returning
    for example if an exception gets raised before stop is called in any test function above,
    pytest will hang forever
    """
    with suppress(Exception):
        mock_ad_xapp.stop()
