Ejemplo n.º 1
0
class VkFavePostLoaderTestCase(unittest.TestCase):
    def setUp(self):
        self.fave_posts = VkFavePostLoader()

    def test_first_of_faves(self):
        self.fave_posts.go_to_prev_page()
        self.fave_posts.go_to_prev_page()
        self.assertEqual(self.fave_posts.current_page['audios'][3]['artist'],
                         'The Dead Weather')

    def test_few_next(self):
        for i in range(16):
            self.fave_posts.go_to_next_page()
        self.assertEqual(self.fave_posts.current_page['audios'][0]['artist'],
                         'Contra')
Ejemplo n.º 2
0
    def __init__(self):
        self.audio_player = MpdAudioPlayer()

        self.page_loaders = cycle([
            VkFavePostLoader(),
            VkMyAudiosLoader(),
            # VkMyWallPostLoader()
        ])
        self.current_page_loader = self.page_loaders.next()
Ejemplo n.º 3
0
 def setUp(self):
     self.fave_posts = VkFavePostLoader()