mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-09 10:22:18 -04:00
Use immutabledict instead of frozendict (#15113)
Additionally: * Consistently use `freeze()` in test --------- Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
cabe4a3005
commit
3b0083c92a
20 changed files with 123 additions and 243 deletions
|
@ -14,14 +14,14 @@
|
|||
from typing import Any, Mapping, Optional
|
||||
from unittest.mock import Mock
|
||||
|
||||
from frozendict import frozendict
|
||||
from immutabledict import immutabledict
|
||||
|
||||
from synapse.config import ConfigError
|
||||
from synapse.config.workers import WorkerConfig
|
||||
|
||||
from tests.unittest import TestCase
|
||||
|
||||
_EMPTY_FROZENDICT: Mapping[str, Any] = frozendict()
|
||||
_EMPTY_IMMUTABLEDICT: Mapping[str, Any] = immutabledict()
|
||||
|
||||
|
||||
class WorkerDutyConfigTestCase(TestCase):
|
||||
|
@ -29,7 +29,7 @@ class WorkerDutyConfigTestCase(TestCase):
|
|||
self,
|
||||
worker_app: str,
|
||||
worker_name: Optional[str],
|
||||
extras: Mapping[str, Any] = _EMPTY_FROZENDICT,
|
||||
extras: Mapping[str, Any] = _EMPTY_IMMUTABLEDICT,
|
||||
) -> WorkerConfig:
|
||||
root_config = Mock()
|
||||
root_config.worker_app = worker_app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue