def opened_right_table() -> OpenedVoteTable: opened_right_table = OpenedRight( key="4972061d4ae700aa12ed3727221aaa99d5e43a27f1cdfc2fc276ef9a8aae6c4f", data="0-0", ) return [ OpenedVote(right=opened_right_table, middle=1), OpenedVote(right=opened_right_table, middle=1), OpenedVote(right=opened_right_table, middle=0), OpenedVote(right=opened_right_table, middle=0), ]
def right_opened_vote_2() -> OpenedVote: return OpenedVote( middle=1, right=OpenedRight( key= "cd9c6d4d31e512c3b3566660d4214d0a1b95410083c3bbf47c6c1e2918f6b13f", data="0-1", ), )
def left_opened_vote_2() -> OpenedVote: return OpenedVote( left=OpenedLeft( key= "2ca784881aebaebc63b53bdc1e55422aefba7cb0536ba48c9d9425e4c5a22fb7", data="0-007629B808CD8C5E-085B43", ), middle=1, )
def right_opened_vote() -> OpenedVote: return OpenedVote( middle=1, right=OpenedRight( key= "4972061d4ae700aa12ed3727221aaa99d5e43a27f1cdfc2fc276ef9a8aae6c4f", data="0-0", ), )
def left_opened_vote() -> OpenedVote: return OpenedVote( left=OpenedLeft( key= "8e7dab35dc53194f871a9d35a1e014ec02854119f387347d92d7310712d7ec73", data="0-6C6AC7158C5F086E-853334", ), middle=1, )
def opened_vote() -> OpenedVote: return OpenedVote( left=OpenedLeft( key= "8e7dab35dc53194f871a9d35a1e014ec02854119f387347d92d7310712d7ec73", data="0-6C6AC7158C5F086E-853334", ), middle=1, right=OpenedRight( key= "4972061d4ae700aa12ed3727221aaa99d5e43a27f1cdfc2fc276ef9a8aae6c4f", data="0-0", ), )
def _load_opened_vote(opened_vote_json: str) -> OpenedVote: left = None right = None middle = int(opened_vote_json["middle"]) if isinstance(opened_vote_json["right"], dict): right = OpenedRight( key=opened_vote_json["right"]["key"], data=opened_vote_json["right"]["data"] ) if isinstance(opened_vote_json["left"], dict): left = OpenedLeft( key=opened_vote_json["left"]["key"], data=opened_vote_json["left"]["data"] ) return OpenedVote(left=left, middle=middle, right=right)
def opened_left_table() -> OpenedVoteTable: opened_1 = OpenedLeft( key="463985511795ba149dc5d052bc0c0dee9d375c47b9c94ca374c262e4a5c38698", data="0-704337551322485-416652537", ) opened_2 = OpenedLeft( key="cbd4fe7ac251760da913e4036dd16e44a0996ebd948df469c57e6ef86c5a1800", data="0-704337551322485-487491335", ) opened_3 = OpenedLeft( key="c67bafd4d11fc0acb43be5bbea6276954c7c46afa46b43985b8563bb008cf294", data="1-141026018500926-992023560", ) opened_4 = OpenedLeft( key="7e46c9468f1881beef0d3208306b9dbe78eaefeae505a67f1cb0221f1a85a9c8", data="1-141026018500926-414929953", ) return [ OpenedVote(left=opened_1, middle=1), OpenedVote(left=opened_2, middle=0), OpenedVote(left=opened_3, middle=0), OpenedVote(left=opened_4, middle=1), ]
def empty_opened_vote() -> OpenedVote: return OpenedVote(middle=0)