Skip to content

Commit

Permalink
[uniffi] Use data classes in Python test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeisler authored and mulmarta committed Mar 8, 2024
1 parent 4606da0 commit 1227a92
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mls-rs-uniffi/tests/simple_scenario_sync.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
from dataclasses import dataclass, field

from mls_rs_uniffi import CipherSuite, generate_signature_keypair, Client, \
GroupStateStorage, ClientConfig, ProtocolVersion

@dataclass
class EpochData:
def __init__(self, id: "int", data: "bytes"):
self.id = id
self.data = data
id: int
data: bytes

@dataclass
class GroupStateData:
def __init__(self, state: "bytes"):
self.state = state
self.epoch_data = []
state: bytes
epoch_data: list[EpochData] = field(default_factory=list)

class PythonGroupStateStorage(GroupStateStorage):
def __init__(self):
Expand Down

0 comments on commit 1227a92

Please sign in to comment.