Add tests for attachments

Imported from Geotrek