Exemplo n.º 1
0
    def test_update_frameset_epic(self, mocker):
        frame_set_mock = mocker.Mock()
        frame_set_mock.ref = "fs_ref"

        epic = EpicFactory()
        epic.add_frame_set(frame_set_mock)

        assert frame_set_mock.epic == epic
Exemplo n.º 2
0
    def test_add_to_frame_sets(self, mocker):
        frame_set_mock = mocker.Mock()
        frame_set_mock.ref = "fs_ref"

        epic = EpicFactory()
        epic.add_frame_set(frame_set_mock)

        assert epic.frame_sets["fs_ref"] == frame_set_mock
Exemplo n.º 3
0
    def test_add_existing_ref(self, mocker):
        epic = EpicFactory()
        epic.frame_sets = {"MY_REF": "my_frame_set"}

        frame_set_mock = mocker.Mock()
        frame_set_mock.ref = "MY_REF"

        with pytest.raises(EpicException):
            epic.add_frame_set(frame_set_mock)