DEV: Fix some deprecation warnings in tests (PR #13010)

GitHub

The title of this pull request changed from “Fix deprecation in tests” to "DEV: Fix deprecation in tests

The title of this pull request changed from “DEV: Fix deprecation in tests” to "DEV: Fix deprecation warnings in tests

The title of this pull request changed from “DEV: Fix deprecation warnings in tests” to "DEV: Fix some deprecation warnings in tests

A test failure was already fixed here, so I’m merging this.