An official architecture is not always available in testing. New architectures get added to unstable first, and only some time after that they may get added to testing as well. This is just now happening with riscv64, and checking whether it's available in testing will not give the correct answer for the question "is this an official Debian architecture?".
Also, since debian-ports only contain unstable, just refuse to use debian-ports if not creating an unstable/sid container.
An official architecture is not always available in testing. New architectures get added to unstable first, and only some time after that they may get added to testing as well. This is just now happening with riscv64, and checking whether it's available in testing will not give the correct answer for the question "is this an official Debian architecture?".
Also, since debian-ports only contain unstable, just refuse to use debian-ports if not creating an unstable/sid container.