protonmsg: unit test for unencodable data
This commit is contained in:
parent
5712c8efb6
commit
1bf3bd22d7
1 changed files with 6 additions and 0 deletions
|
|
@ -27,6 +27,12 @@ class TestProtonMsg(unittest.TestCase):
|
|||
protonmsg.queue_msg('test.msg', {'testheader': 1}, 'test body')
|
||||
self.assertMsg('test.msg', body='"test body"', testheader=1)
|
||||
|
||||
def test_queue_msg_not_serializable(self):
|
||||
# mostly just testing that encoder does not error on data that cannot
|
||||
# be json encoded
|
||||
protonmsg.queue_msg('koji@example.com', {'testheader': 1}, object())
|
||||
self.assertMsg('koji@example.com', body=None, testheader=1)
|
||||
|
||||
def test_prep_package_list_change_add(self):
|
||||
protonmsg.prep_package_list_change('postPackageListChange',
|
||||
action='add', tag={'name': 'test-tag'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue