Replace assertRaises with assertRaisesRegex in namespace_tests.py
Replace assertRaises with assertRaisesRegex in namespace_tests.py

assertRaises is not as good of a test as asserRaisesRegex.
The latter has an extra parameter to match the exception message,
allowing more more precision when checking an error.

Bug: T154281
Change-Id: Ie6d334b2225cde1b2c4380b5e62b9860ba42a2fc

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