Isn't the Life In the U.K. test for Indefinite Leave To Remain visas or citizenship? I didn't think it was for fiancé or spouse visas.
That's correct - it's required for both ILR and UK citizenship (you just take it once, before ILR, and then produce the pass certificate again for citizenship).
It can only be taken in the UK, and you need proof of UK address... so it's not possible to take it for a fiance or spousal visa anyway.
However, it can be taken at any time after you arrive in the UK, and the result never expires (unless you lose the pass certificate, in which case you have to take it again), so you don't have to wait until just before ILR if you don't want to.