import importlib.util import json import struct import tempfile import threading import unittest import urllib.request import urllib.error from pathlib import Path spec = importlib.util.spec_from_file_location('archive', Path(__file__).parents[1] / 'server/app.py') app = importlib.util.module_from_spec(spec) spec.loader.exec_module(app) def fixture(edition, marker=0): data = bytearray(app.SIZE) data[:8] = b'SONIXDEV' data[100] = marker off = 0xD29000 if edition >= 5 else 0xD49000 struct.pack_into('