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

@@ -2,7 +2,7 @@ import fbchat
from fbchat._page import Page
def test_page_from_graphql():
def test_page_from_graphql(session):
data = {
"id": "123456",
"name": "Some school",
@@ -12,10 +12,11 @@ def test_page_from_graphql():
"city": None,
}
assert Page(
session=session,
id="123456",
photo=fbchat.Image(url="https://scontent-arn2-1.xx.fbcdn.net/v/..."),
name="Some school",
url="https://www.facebook.com/some-school/",
city=None,
category="SCHOOL",
) == Page._from_graphql(data)
) == Page._from_graphql(session, data)