tests: Use assertEqual instead of outdated assertEquals.

This removes a bunch of ``DeprecationWarning`` while running tests.