Issue #3126969 by mondrake, longwave, alexpott, daffie: Replace usage of assertAttributeInstanceOf() that is deprecated