tests: Consistently use assert_length helper.

This helper does some nice things like printing out
the data structure incase of failure.
This commit is contained in:
Abhijeet Prasad Bodas
2021-05-17 09:11:32 +05:30
committed by Tim Abbott
parent 4d45b45640
commit 352634a851
57 changed files with 448 additions and 448 deletions

View File

@@ -1009,7 +1009,7 @@ Output:
streams = sorted(streams, key=lambda x: x.name)
subscribed_streams = gather_subscriptions(self.nonreg_user(user_name))[0]
self.assertEqual(len(subscribed_streams), len(streams))
self.assert_length(subscribed_streams, len(streams))
for x, y in zip(subscribed_streams, streams):
self.assertEqual(x["name"], y.name)