Browse Source

[tests] add test for prior bugfix

pull/47/head
andrei 8 years ago
parent
commit
70bef21ca7
  1. 22
      tests/gateway/events.py

22
tests/gateway/events.py

@ -18,3 +18,25 @@ def test_from_dispatch():
def test_event_creation(benchmark):
benchmark(create_resumed_payload)
def test_guild_role_guild_id_attach():
event = GatewayEvent.from_dispatch(None, {
't': 'GUILD_ROLE_CREATE',
'd': {
'role': {
'id': 1,
'name': 'test',
'color': 1,
'hoist': True,
'position': 0,
'permissions': 0,
'managed': False,
'mentionable': False,
},
'guild_id': 2,
}
})
assert event.guild_id == 2
assert event.role.guild_id == 2

Loading…
Cancel
Save