Add assert_startswith/endswith helper functions
This commit is contained in:
parent
fa601b8111
commit
60dea38d10
6 changed files with 23 additions and 17 deletions
|
@ -52,6 +52,12 @@ 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