mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00

Now that only the second container can send JSON-encoded progress information, we can the untrusted JSON parsing. The parse_progress was also renamed to `parse_progress_trusted` to ensure future developers don't mistake this as a safe method. The old methods for sending untrusted JSON were repurposed to send the progress instead to stderr for troubleshooting in development mode. Fixes #456
22 lines
536 B
Python
22 lines
536 B
Python
import itertools
|
|
import json
|
|
from typing import Any, Dict
|
|
|
|
import pytest
|
|
from pytest_mock import MockerFixture
|
|
|
|
from dangerzone.document import Document
|
|
from dangerzone.isolation_provider.container import Container
|
|
|
|
# XXX Fixtures used in abstract Test class need to be imported regardless
|
|
from .. import pdf_11k_pages, sanitized_text, uncommon_text
|
|
from .base import IsolationProviderTest
|
|
|
|
|
|
@pytest.fixture
|
|
def provider() -> Container:
|
|
return Container(enable_timeouts=False)
|
|
|
|
|
|
class TestContainer(IsolationProviderTest):
|
|
pass
|