This is going to come down to the Terms and Conditions... It is a ridiculous anomaly that there is such a variation in the product offered within alliances. If your confirmation email specifies two pieces you will almost certainly prevail in small claims unless there is a prominent notice advising you on the code share there are different rules. You can complain to the aviation authority in Madrid...
Agencia Estatal de Seguridad Aérea.
de Calidad y Protección al Usuario.
Avda. General Perón 40, Acceso B, (Recepción planta 1a)
28020 MADRID
Tel.: + 34 91 396 82 10
http://www.seguridadaerea.es/