From 6f96c8ddce715d1453679c465093242d5a9988a5 Mon Sep 17 00:00:00 2001 From: Jannis Jahr Date: Wed, 4 Sep 2024 14:07:32 +0200 Subject: [PATCH] WCM-316: add tests for teaser attributes --- core/src/zeit/content/volume/tests/test_volume.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/zeit/content/volume/tests/test_volume.py b/core/src/zeit/content/volume/tests/test_volume.py index 1a40c9bff1..7e1428523b 100644 --- a/core/src/zeit/content/volume/tests/test_volume.py +++ b/core/src/zeit/content/volume/tests/test_volume.py @@ -84,6 +84,9 @@ def setUp(self): volume = Volume() volume.year = 2015 volume.volume = 1 + volume.background_color = '1f1f1f' + volume.title = 'Obamas Rede' + volume.teaser = 'Obama stellt neuen Plan vor' zeit.cms.content.add.find_or_create_folder('2015', '01') self.repository['2015']['01']['ausgabe'] = volume @@ -99,6 +102,12 @@ def test_content_with_year_and_volume_and_product_adapts_to_IVolume(self): volume = zeit.content.volume.interfaces.IVolume(content) self.assertEqual(volume, self.repository['2015']['01']['ausgabe']) + def test_teaser_settings_are_set(self): + volume = zeit.cms.interfaces.ICMSContent('http://xml.zeit.de/2015/01/ausgabe') + self.assertEqual('Obamas Rede', volume.title) + self.assertEqual('Obama stellt neuen Plan vor', volume.teaser) + self.assertEqual('1f1f1f', volume.background_color) + def test_content_online_product_has_no_IVolume(self): # *All* content that is added in vivi gets year and volume from # zeit.cms.settings.interfaces.IGlobalSettings, so we need to ensure