Glenn Franxman and I were brain storming on how to do unittesting with a real browser DOM with working javascript. Basically everything accessible to the browser could be accessible to python
I ran across this post: http://ejohn.org/blog/bringing-the-browser-to-the-server/ where he uses Rhino and a custom window library ...