compare instance to basestring instead of (str, unicode)
This commit is contained in:
parent
3ced2bee38
commit
8afff42465
9 changed files with 13 additions and 13 deletions
|
|
@ -242,7 +242,7 @@ class AuMBrowser(BaseBrowser):
|
|||
|
||||
@pageaccess
|
||||
def get_profile(self, link):
|
||||
if isinstance(link, (str,unicode)) and link.startswith('/'):
|
||||
if isinstance(link, basestring) and link.startswith('/'):
|
||||
link = link[1:]
|
||||
self.location('/%s' % link)
|
||||
return self.page
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ class BNPorc(BaseBrowser):
|
|||
return not self.is_on_page(pages.LoginPage) or self.is_logging
|
||||
|
||||
def login(self):
|
||||
assert isinstance(self.username, (str,unicode))
|
||||
assert isinstance(self.password, (str,unicode))
|
||||
assert isinstance(self.username, basestring)
|
||||
assert isinstance(self.password, basestring)
|
||||
assert self.password.isdigit()
|
||||
|
||||
if not self.is_on_page(pages.LoginPage):
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ class Cragr(BaseBrowser):
|
|||
return self.page and self.page.is_logged() or self.is_logging
|
||||
|
||||
def login(self):
|
||||
assert isinstance(self.username, (str,unicode))
|
||||
assert isinstance(self.password, (str,unicode))
|
||||
assert isinstance(self.username, basestring)
|
||||
assert isinstance(self.password, basestring)
|
||||
|
||||
self.is_logging = True
|
||||
if not self.is_on_page(pages.LoginPage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue