Only call _invalidate_all if it exists
the memoize decorator adds the _invalidate_all function when called. Due to the deferred initialization that may not happen in a test.
This commit is contained in:
parent
28831300fc
commit
70c3d34731
@ -48,7 +48,8 @@ class TestApiCalls(unittest.TestCase):
|
||||
|
||||
def tearDown(self):
|
||||
"""Clean internal cache"""
|
||||
self.api._invalidate_all()
|
||||
if hasattr(self.api, '_invalidate_all'):
|
||||
self.api._invalidate_all()
|
||||
|
||||
def test_ring_packages(self):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user