TestAPIMWException.tearDown: Make sure warning and error methods are restored
TestAPIMWException.tearDown: Make sure warning and error methods are restored

Fix Travis-CI failures.

Bug: T196317
Change-Id: Ia3f2616be8a8bd22e858f39bc31d2945c9bde5da

wikimedia/pywikibot-core,wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core