This is the Fedora counterpart of upstream https://github.com/rpm-software-management/libdnf/issues/362 ticket, mainly for tracking purposes.
For the record, https://github.com/rpm-software-management/libdnf/commit/4cd90939d45fa8056f00873665a1d166158edf70 seems to be sufficient to get basic libdnf functionality going with alternative rpmdb backends for testing purposes. So test-blockage can be removed by just backporting that.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.
AFAICT this has gotten fixed in all the versions that we care about, so I'll just close this bit of monologue...