[test] discovery_test.py can read key from stdin