Tests: DRY out logging tests

Updated to define the tests independently. Let me know if you prefer separate declarations to this inline style.