fix pixiv agent shutdown

This commit is contained in:
Albert Yi
2018-05-09 16:13:47 -07:00
parent 780d899c85
commit e23814be92
2 changed files with 7 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ module Downloads
super
# need to reset the connection
Sources::Strategies::Pixiv.new.agent.shutdown
Sources::Strategies::Pixiv.new("http://www.pixiv.net").agent.shutdown
end
context "An ugoira site for pixiv" do

View File

@@ -5,10 +5,14 @@ module Sources
def get_source(source)
@site = Sources::Site.new(source)
@site.get
@site
end
def teardown
super
# need to reset the connection
@site.strategy.agent.shutdown
@site
Sources::Strategies::Pixiv.new("http://www.pixiv.net").agent.shutdown
end
context "in all cases" do