Make models use kw_only (on Python > 3.5)

This commit is contained in:
Mads Marquart
2019-12-11 14:57:40 +01:00
parent 523c320c08
commit 91d4055545
10 changed files with 40 additions and 32 deletions

View File

@@ -10,12 +10,12 @@ pytestmark = pytest.mark.online
@pytest.fixture(
scope="module",
params=[
Plan(int(time()) + 100, random_hex()),
Plan(time=int(time()) + 100, title=random_hex()),
pytest.param(
Plan(int(time()), random_hex()),
Plan(time=int(time()), title=random_hex()),
marks=[pytest.mark.xfail(raises=FBchatFacebookError)],
),
pytest.param(Plan(0, None), marks=[pytest.mark.xfail()]),
pytest.param(Plan(time=0, title=None), marks=[pytest.mark.xfail()]),
],
)
def plan_data(request, client, user, thread, catch_event, compare):

View File

@@ -13,26 +13,26 @@ pytestmark = pytest.mark.online
Poll(
title=random_hex(),
options=[
PollOption(random_hex(), vote=True),
PollOption(random_hex(), vote=True),
PollOption(text=random_hex(), vote=True),
PollOption(text=random_hex(), vote=True),
],
),
Poll(
title=random_hex(),
options=[
PollOption(random_hex(), vote=False),
PollOption(random_hex(), vote=False),
PollOption(text=random_hex(), vote=False),
PollOption(text=random_hex(), vote=False),
],
),
Poll(
title=random_hex(),
options=[
PollOption(random_hex(), vote=True),
PollOption(random_hex(), vote=True),
PollOption(random_hex(), vote=False),
PollOption(random_hex(), vote=False),
PollOption(random_hex()),
PollOption(random_hex()),
PollOption(text=random_hex(), vote=True),
PollOption(text=random_hex(), vote=True),
PollOption(text=random_hex(), vote=False),
PollOption(text=random_hex(), vote=False),
PollOption(text=random_hex()),
PollOption(text=random_hex()),
],
),
pytest.param(

View File

@@ -22,9 +22,13 @@ EMOJI_LIST = [
]
STICKER_LIST = [
Sticker("767334476626295"),
pytest.param(Sticker("0"), marks=[pytest.mark.xfail(raises=FBchatFacebookError)]),
pytest.param(Sticker(None), marks=[pytest.mark.xfail(raises=FBchatFacebookError)]),
Sticker(uid="767334476626295"),
pytest.param(
Sticker(uid="0"), marks=[pytest.mark.xfail(raises=FBchatFacebookError)]
),
pytest.param(
Sticker(uid=None), marks=[pytest.mark.xfail(raises=FBchatFacebookError)]
),
]
TEXT_LIST = [