Exemplo n.º 1
0
    def test_with_valid_quality(self):
        result = BaseAPIClient.get_qualities(
                BaseAPIClient.MED_AUDIO_QUALITY, False)

        expected = [
                BaseAPIClient.LOW_AUDIO_QUALITY,
                BaseAPIClient.MED_AUDIO_QUALITY]

        self.assertEqual(expected, result)
Exemplo n.º 2
0
    def test_with_valid_quality(self):
        result = BaseAPIClient.get_qualities(BaseAPIClient.MED_AUDIO_QUALITY,
                                             False)

        expected = [
            BaseAPIClient.LOW_AUDIO_QUALITY, BaseAPIClient.MED_AUDIO_QUALITY
        ]

        self.assertEqual(expected, result)
Exemplo n.º 3
0
 def test_with_invalid_quality_returning_none(self):
     result = BaseAPIClient.get_qualities("foo", False)
     self.assertEqual([], result)
Exemplo n.º 4
0
 def test_with_invalid_quality_returning_all(self):
     result = BaseAPIClient.get_qualities("foo", True)
     self.assertEqual(BaseAPIClient.ALL_QUALITIES, result)
Exemplo n.º 5
0
 def test_with_invalid_quality_returning_none(self):
     result = BaseAPIClient.get_qualities("foo", False)
     self.assertEqual([], result)
Exemplo n.º 6
0
 def test_with_invalid_quality_returning_all(self):
     result = BaseAPIClient.get_qualities("foo", True)
     self.assertEqual(BaseAPIClient.ALL_QUALITIES, result)