Bring back test_caching on another method
This commit is contained in:
parent
0eac6e9ae2
commit
a8522fded3
|
@ -941,6 +941,21 @@ class TestPyLast(unittest.TestCase):
|
||||||
# Assert
|
# Assert
|
||||||
self.assertIsInstance(library, pylast.Library)
|
self.assertIsInstance(library, pylast.Library)
|
||||||
|
|
||||||
|
def test_caching(self):
|
||||||
|
# Arrange
|
||||||
|
user = self.network.get_user("RJ")
|
||||||
|
|
||||||
|
# Act
|
||||||
|
self.network.enable_caching()
|
||||||
|
tags1 = user.get_top_tags(limit=1, cacheable=True)
|
||||||
|
tags2 = user.get_top_tags(limit=1, cacheable=True)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
self.assertTrue(self.network.is_caching_enabled())
|
||||||
|
self.assertEqual(tags1, tags2)
|
||||||
|
self.network.disable_caching()
|
||||||
|
self.assertFalse(self.network.is_caching_enabled())
|
||||||
|
|
||||||
def test_album_mbid(self):
|
def test_album_mbid(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
mbid = "a6a265bf-9f81-4055-8224-f7ac0aa6b937"
|
mbid = "a6a265bf-9f81-4055-8224-f7ac0aa6b937"
|
||||||
|
|
Loading…
Reference in a new issue