Skip to content

Commit

Permalink
WCM-316: add tests for teaser attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinnaj94 committed Sep 4, 2024
1 parent ba9cfc4 commit 6f96c8d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/src/zeit/content/volume/tests/test_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 6f96c8d

Please sign in to comment.