[tests] rewrite site_tests.TestSiteObject.test_namespace_methods
[tests] rewrite site_tests.TestSiteObject.test_namespace_methods

- use subtests instead of all() function
- test namespace id -1 and -2
- take into account that str is an iterable and additonal tests

Bug: T240117
Change-Id: Ie5610c55366721509641c56f0d122733a43c5bb4

wikimedia/pywikibot-core,wikimedia/pywikibot-core