Skip to content

Commit

Permalink
chore: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
salman2013 committed Feb 19, 2024
1 parent 776299e commit 65fc28a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions edx_event_bus_redis/internal/tests/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,18 @@ def test_no_type(self):
)

def test_no_event_data(self):
msg = (b'1', {b'id': b'629f9892-c258-11ed-8dac-1c83413013cb', b'event_data': self.event_data_bytes})
msg = (
b'1',
{
b'id': b'629f9892-c258-11ed-8dac-1c83413013cb',
b'event_data': self.event_data_bytes,
}
)
with pytest.raises(UnusableMessageError) as excinfo:
RedisMessage.parse(msg, topic='some-local-topic')

#import pdb; pdb.set_trace()
assert excinfo.value.args == (
"Error determining metadata from message headers: "
"EventsMetadata.__init__() missing 1 required positional argument: 'event_type'",
"Error determining metadata from message headers: EventsMetadata.__init__() missing 1 required positional argument: 'event_type'",
)

def test_bad_msg(self):
Expand Down

0 comments on commit 65fc28a

Please sign in to comment.