Replaced old assertions with helper methods from unittest.TestCase to get better error messages in case of failures.