Convert test_origin_head from unittest to pytest
A future commit will significantly change test initialization, and using fixtures simplifies this.