mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-24 09:44:28 +01:00
Add test cases that change story URL.
This commit is contained in:
parent
16a090c019
commit
df10e539a9
1 changed files with 6 additions and 0 deletions
|
|
@ -81,6 +81,12 @@ class TestSiteAdapter(BaseSiteAdapter):
|
|||
|
||||
return
|
||||
|
||||
if idnum >= 700 and idnum <= 710:
|
||||
self._setURL('http://test1.com?sid=%s'%(idnum+100))
|
||||
self.story.setMetadata('storyId',self.parsedUrl.query.split('=',)[1])
|
||||
idstr = self.story.getMetadata('storyId')
|
||||
idnum = int(idstr)
|
||||
|
||||
if idstr == '665' and not (self.is_adult or self.getConfig("is_adult")):
|
||||
logger.warn("self.is_adult:%s"%self.is_adult)
|
||||
raise exceptions.AdultCheckRequired(self.url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue