Beispiel #1
0
    def test_extend_image_filename(self):
        """
        Test the extend_image_filename method
        """
        # GIVEN: A theme object
        theme = ThemeXML()
        theme.theme_name = 'MyBeautifulTheme   '
        theme.background_filename = '    video.mp4'
        theme.background_type = 'video'
        path = os.path.expanduser('~')

        # WHEN: ThemeXML.extend_image_filename is run
        theme.extend_image_filename(path)

        # THEN: The filename of the background should be correct
        expected_filename = os.path.join(path, 'MyBeautifulTheme', 'video.mp4')
        self.assertEqual(expected_filename, theme.background_filename)
        self.assertEqual('MyBeautifulTheme', theme.theme_name)
Beispiel #2
0
    def test_extend_image_filename(self):
        """
        Test the extend_image_filename method
        """
        # GIVEN: A theme object
        theme = ThemeXML()
        theme.theme_name = 'MyBeautifulTheme   '
        theme.background_filename = '    video.mp4'
        theme.background_type = 'video'
        path = os.path.expanduser('~')

        # WHEN: ThemeXML.extend_image_filename is run
        theme.extend_image_filename(path)

        # THEN: The filename of the background should be correct
        expected_filename = os.path.join(path, 'MyBeautifulTheme', 'video.mp4')
        self.assertEqual(expected_filename, theme.background_filename)
        self.assertEqual('MyBeautifulTheme', theme.theme_name)