[FEAT] api tests: Test APIMWException
[FEAT] api tests: Test APIMWException

The patch adds tests for the APIMWException. To reliably cause such an
exception it patches the http import from the pywikibot.data.api module to its
own class which returns predefined data.

Because there might be some setting up involved before the actual request is
done that should be tested, the tests using a Page instance do a dummy call
before.

Change-Id: I6165a073d74916c9dc42f7667ae18bdd027b1176

trishnaguha/pywikibot-core,magul/pywikibot-core,npdoty/pywikibot,Darkdadaah/pywikibot-core,Darkdadaah/pywikibot-core,h4ck3rm1k3/pywikibot-core,h4ck3rm1k3/pywikibot-core,npdoty/pywikibot,smalyshev/pywikibot-core,valhallasw/pywikibot-core,icyflame/batman,PersianWikipedia/pywikibot-core,jayvdb/pywikibot-core,TridevGuha/pywikibot-core,emijrp/pywikibot-core,happy5214/pywikibot-core,hasteur/g13bot_tools_new,hasteur/g13bot_tools_new,VcamX/pywikibot-core,jayvdb/pywikibot-core,hasteur/g13bot_tools_new,wikimedia/pywikibot-core,xZise/pywikibot-core,darthbhyrava/pywikibot-local,happy5214/pywikibot-core,wikimedia/pywikibot-core,magul/pywikibot-core