TestPyLastWithLastFm and TestPyLastWithLibreFm now inherit from PyLastTestCase
This commit is contained in:
parent
70aad87a1b
commit
f18fd3f758
10 changed files with 28 additions and 25 deletions
|
@ -30,9 +30,18 @@ def load_secrets():
|
|||
return doc
|
||||
|
||||
|
||||
@flaky(max_runs=5, min_passes=1)
|
||||
class PyLastTestCase(unittest.TestCase):
|
||||
|
||||
def assert_startswith(self, str, prefix, start=None, end=None):
|
||||
self.assertTrue(str.startswith(prefix, start, end))
|
||||
|
||||
def assert_endswith(self, str, suffix, start=None, end=None):
|
||||
self.assertTrue(str.endswith(suffix, start, end))
|
||||
|
||||
|
||||
@flaky(max_runs=5, min_passes=1)
|
||||
class TestPyLastWithLastFm(PyLastTestCase):
|
||||
|
||||
secrets = None
|
||||
|
||||
def unix_timestamp(self):
|
||||
|
@ -52,12 +61,6 @@ class PyLastTestCase(unittest.TestCase):
|
|||
api_key=API_KEY, api_secret=API_SECRET,
|
||||
username=self.username, password_hash=password_hash)
|
||||
|
||||
def assert_startswith(self, str, prefix, start=None, end=None):
|
||||
self.assertTrue(str.startswith(prefix, start, end))
|
||||
|
||||
def assert_endswith(self, str, suffix, start=None, end=None):
|
||||
self.assertTrue(str.endswith(suffix, start, end))
|
||||
|
||||
def helper_is_thing_hashable(self, thing):
|
||||
# Arrange
|
||||
things = set()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue