[python] make test use np.random.rand