Fix a unit test regression for WebHooks.

Review Request #10457 — Created March 20, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

A while back, JSON serialization for the API was changed to always
return ordered keys. This affected WebHooks, but the unit test was never
fixed up to account for this.

This change fixes up the expected WebHook payload, ordering the keys.
When I say "ordering," it's based on the json module's method of
ordering, which orders them before converting to strings, which is why
"null" (None) is first.

Unit tests pass.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix a unit test regression for WebHooks.
A while back, JSON serialization for the API was changed to always return ordered keys. This affected WebHooks, but the unit test was never fixed up to account for this. This change fixes up the expected WebHook payload, ordering the keys. When I say "ordering," it's based on the `json` module's method of ordering, which orders them before converting to strings, which is why `"null"` (`None`) is first.
b0d46f733d1d91251652592e8dfba005e9d80426 Christian Hammond
reviewboard/notifications/tests/test_webhooks.py
Loading...