Temporarily Mark Tests with get_sticker_set as XFAIL due to API 7.2 Update (#4190)

This commit is contained in:
Bibo-Joshi 2024-04-02 22:13:54 +02:00 committed by GitHub
parent 23536ee759
commit 7331fff3fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -471,6 +471,7 @@ class TestStickerWithRequest(TestStickerBase):
assert protected.has_protected_content assert protected.has_protected_content
assert not unprotected.has_protected_content assert not unprotected.has_protected_content
@pytest.mark.xfail(reason="API 7.2 incompatibility, see #4181")
async def test_premium_animation(self, bot): async def test_premium_animation(self, bot):
# testing animation sucks a bit since we can't create a premium sticker. What we can do is # testing animation sucks a bit since we can't create a premium sticker. What we can do is
# get a sticker set which includes a premium sticker and check that specific one. # get a sticker set which includes a premium sticker and check that specific one.
@ -488,6 +489,7 @@ class TestStickerWithRequest(TestStickerBase):
} }
assert premium_sticker.premium_animation.to_dict() == premium_sticker_dict assert premium_sticker.premium_animation.to_dict() == premium_sticker_dict
@pytest.mark.xfail(reason="API 7.2 incompatibility, see #4181")
async def test_custom_emoji(self, bot): async def test_custom_emoji(self, bot):
# testing custom emoji stickers is as much of an annoyance as the premium animation, see # testing custom emoji stickers is as much of an annoyance as the premium animation, see
# in test_premium_animation # in test_premium_animation
@ -526,6 +528,7 @@ class TestStickerWithRequest(TestStickerBase):
@pytest.fixture() @pytest.fixture()
async def sticker_set(bot): async def sticker_set(bot):
pytest.xfail(reason="API 7.2 incompatibility, see #4181")
ss = await bot.get_sticker_set(f"test_by_{bot.username}") ss = await bot.get_sticker_set(f"test_by_{bot.username}")
if len(ss.stickers) > 100: if len(ss.stickers) > 100:
try: try:
@ -540,6 +543,7 @@ async def sticker_set(bot):
@pytest.fixture() @pytest.fixture()
async def animated_sticker_set(bot): async def animated_sticker_set(bot):
pytest.xfail(reason="API 7.2 incompatibility, see #4181")
ss = await bot.get_sticker_set(f"animated_test_by_{bot.username}") ss = await bot.get_sticker_set(f"animated_test_by_{bot.username}")
if len(ss.stickers) > 100: if len(ss.stickers) > 100:
try: try:
@ -796,6 +800,7 @@ class TestStickerSetWithoutRequest(TestStickerSetBase):
@pytest.mark.xdist_group("stickerset") @pytest.mark.xdist_group("stickerset")
@pytest.mark.xfail(reason="API 7.2 incompatibility, see #4181")
class TestStickerSetWithRequest: class TestStickerSetWithRequest:
async def test_create_sticker_set( async def test_create_sticker_set(
self, bot, chat_id, sticker_file, animated_sticker_file, video_sticker_file self, bot, chat_id, sticker_file, animated_sticker_file, video_sticker_file
@ -1107,6 +1112,7 @@ class TestMaskPositionWithoutRequest(TestMaskPositionBase):
assert hash(a) != hash(e) assert hash(a) != hash(e)
@pytest.mark.xfail(reason="API 7.2 incompatibility, see #4181")
class TestMaskPositionWithRequest(TestMaskPositionBase): class TestMaskPositionWithRequest(TestMaskPositionBase):
async def test_create_new_mask_sticker_set(self, bot, chat_id, sticker_file, mask_position): async def test_create_new_mask_sticker_set(self, bot, chat_id, sticker_file, mask_position):
name = f"masks_by_{bot.username}" name = f"masks_by_{bot.username}"