Browse Source

Fix test_resolve_invite due to changed type

pull/7492/head
Rapptz 3 years ago
parent
commit
3d0c506124
  1. 3
      discord/utils.py
  2. 2
      tests/test_utils.py

3
discord/utils.py

@ -738,8 +738,7 @@ class ResolvedInvite(NamedTuple):
def resolve_invite(invite: Union[Invite, str]) -> ResolvedInvite:
"""
Resolves an invite from a :class:`~discord.Invite`, URL or code.
"""Resolves an invite from a :class:`~discord.Invite`, URL or code.
.. versionchanged:: 2.0
Now returns a :class:`.ResolvedInvite` instead of a

2
tests/test_utils.py

@ -139,7 +139,7 @@ def test_valid_icon_size():
]
)
def test_resolve_invite(url, code):
assert utils.resolve_invite(url) == code
assert utils.resolve_invite(url).code == code
@pytest.mark.parametrize(

Loading…
Cancel
Save