tests: python3 changes for dns tests