1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Add resolver quota

This commit is contained in:
Maksym Pavlenko
2019-03-22 23:12:59 -07:00
parent 91178750a8
commit 34ed952aba
2 changed files with 23 additions and 4 deletions

View File

@@ -40,3 +40,11 @@ class TestDynamo(unittest.TestCase):
self.assertEqual(counter, 1)
counter = ytdl._update_resolve_counter('86qZ')
self.assertEqual(counter, 2)
def test_download(self):
url = ytdl.download('86qZ', '7XJYLq3gviY')
self.assertIsNotNone(url)
def test_quota_check(self):
with self.assertRaises(ytdl.QuotaExceeded):
ytdl.download('xro548QlJ', 'j51NFs0bZ9c')