Artifacts stdlib: Fix some tests if we aren't running with `--depwarn=error` (#60892)
I tested this locally with:
- [x] `--depwarn=no`
- [x] `--depwarn=yes`
- [x] `--depwarn=error`
All codepaths pass for me locally.
## Motivation
To get the Artifacts tests passing in PkgEval.