From fa5e6fe76139abf144eb90a9038ea6c36b0b031b Mon Sep 17 00:00:00 2001 From: ide-an Date: Tue, 10 Nov 2020 23:30:27 +0900 Subject: [PATCH] Add ordering test --- tests/test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test.py b/tests/test.py index 9fd0c41..f01e2e7 100644 --- a/tests/test.py +++ b/tests/test.py @@ -217,10 +217,13 @@ class TestYTMusic(unittest.TestCase): self.assertGreater(len(results), 25) results = youtube_auth.get_library_upload_songs(100, 'a_to_z') self.assertGreater(len(results), 25) + self.assertTrue(results[0]['title'] <= results[1]['title'], "Song order is not A to Z") results = youtube_auth.get_library_upload_songs(100, 'z_to_a') self.assertGreater(len(results), 25) + self.assertTrue(results[0]['title'] >= results[1]['title'], "Song order is not Z to A") results = youtube_auth.get_library_upload_songs(100, 'recently_added') self.assertGreater(len(results), 25) + # There is no way to check if the order is correct. @unittest.skip("Must not have any uploaded songs to pass") def test_get_library_upload_songs_empty(self):