Clean up unit tests that no longer apply for Python 3.12 compatibility.
assertDictContainsSubset is a method from unittest so we don't need to test it. It's also deleted in Python 3.12.
Migrated the use of deprecated assertion methods. They are also removed in Python 3.12. Some of them are duplicated calls to the deprecated & supported versions of the same method.
Clean up unit tests that no longer apply for Python 3.12 compatibility.
assertDictContainsSubset
is a method from unittest so we don't need to test it. It's also deleted in Python 3.12.