Example #1
0
    def test_get_frame_call(self, mocker):
        get_frame_mock = mocker.patch(
            f"{CLASS_DEFINITION_PATH}.get_frame", return_value=None
        )
        epic = EpicFactory()

        epic.get_indicator_value("my_fs", "my_indicator", 55)

        assert get_frame_mock.call_args_list == [call(frame_set_ref="my_fs", offset=55)]
Example #2
0
    def test_nominal(self, mocker):
        mocker.patch(
            f"{CLASS_DEFINITION_PATH}.get_frame",
            return_value={"my_indicator": "indicator_value"},
        )
        epic = EpicFactory()

        assert epic.get_indicator_value("my_fs", "my_indicator") == "indicator_value"
Example #3
0
    def test_no_frame(self, mocker):
        mocker.patch(f"{CLASS_DEFINITION_PATH}.get_frame", return_value=None)
        epic = EpicFactory()

        assert epic.get_indicator_value("my_fs", "my_indicator") is None