tests: Update tests for static binding protection to check AttributeErrors