Esempio n. 1
0
    def test_get_info(self):
        """
        Test the get_info() method of the SystemPlayer
        """
        # GIVEN: A SystemPlayer instance
        player = SystemPlayer(self)

        # WHEN: get_info() is called
        result = player.get_info()

        # THEN: The info should be correct
        expected_info = 'This media player uses your operating system to provide media capabilities.<br/> ' \
            '<strong>Audio</strong><br/>[]<br/><strong>Video</strong><br/>[]<br/>'
        self.assertEqual(expected_info, result)
Esempio n. 2
0
    def test_get_info(self):
        """
        Test the get_info() method of the SystemPlayer
        """
        # GIVEN: A SystemPlayer instance
        player = SystemPlayer(self)

        # WHEN: get_info() is called
        result = player.get_info()

        # THEN: The info should be correct
        expected_info = 'This media player uses your operating system to provide media capabilities.<br/> ' \
            '<strong>Audio</strong><br/>[]<br/><strong>Video</strong><br/>[]<br/>'
        self.assertEqual(expected_info, result)
Esempio n. 3
0
    def test_get_info(self, MockQMediaPlayer):
        """
        Test the get_info() method of the SystemPlayer
        """
        # GIVEN: A SystemPlayer instance
        mocked_media_player = MagicMock()
        mocked_media_player.supportedMimeTypes.return_value = []
        MockQMediaPlayer.return_value = mocked_media_player
        player = SystemPlayer(self)

        # WHEN: get_info() is called
        result = player.get_info()

        # THEN: The info should be correct
        expected_info = 'This media player uses your operating system to provide media capabilities.<br/> ' \
            '<strong>Audio</strong><br/>[]<br/><strong>Video</strong><br/>[]<br/>'
        assert expected_info == result