Moved to using the patch decorator

The tests become a bit too difficult to read when nesting 'with patch'.