Add session attribute to Group/User/Page/Thread

This commit is contained in:
Mads Marquart
2020-01-08 23:07:13 +01:00
parent a5abb05ab3
commit 0531a9e482
9 changed files with 71 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
from fbchat._group import Group
def test_group_from_graphql():
def test_group_from_graphql(session):
data = {
"name": "Group ABC",
"thread_key": {"thread_fbid": "11223344"},
@@ -26,6 +26,7 @@ def test_group_from_graphql():
"event_reminders": {"nodes": []},
}
assert Group(
session=session,
id="11223344",
photo=None,
name="Group ABC",
@@ -40,4 +41,4 @@ def test_group_from_graphql():
approval_mode=False,
approval_requests=set(),
join_link="",
) == Group._from_graphql(data)
) == Group._from_graphql(session, data)