コード例 #1
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)
コード例 #2
0
    def test_offset__invalid(self):
        epic = EpicFactory()
        frame_set_mock = ["frame1", "frame2"]
        epic.frame_sets = {"my_fs": frame_set_mock}

        assert epic.get_frame("my_fs", 2) is None
コード例 #3
0
    def test_offset(self):
        epic = EpicFactory()
        frame_set_mock = ["frame1", "frame2"]
        epic.frame_sets = {"my_fs": frame_set_mock}

        assert epic.get_frame("my_fs", 1) == "frame1"