Sounds like the test light is providing the ground path for the gauge. Make sure that you have a complete circuit to the oil pressure sending unit, and that you are using the correct sending unit for a gauge system vs idiot light. This is the one that you need.
Yep. That’s the one I’m using! I read a few threads that’s say you can’t use Teflon tape because the unit won’t get good enough ground to the engine. Mine definitely has Teflon tape on it. Just not sure how it wouldn’t leak oil if tape isn’t used