Allow assert_warns to match against multiple warnings.
Allow assert_warns to match against multiple warnings.

Our `TestCase.assert_warns` method only worked when a single warning was
being emitted by code. There wasn't much reason for this, besides of
ease of implementation, and it made unit tests more fragile.

This change updates the function to check the provided warning
information against all emitted warnings, looking for a match. If none
are found, this will fail with an explicit error message.

Testing Done:
Unit tests pass.

Made use of this in an upcoming unit test, which has to deal with multiple
warnings. It passed.

Reviewed at https://reviews.reviewboard.org/r/10774/

reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard