From e23814be928684234296ff8514cefc64ce877db2 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Wed, 9 May 2018 16:13:47 -0700 Subject: [PATCH] fix pixiv agent shutdown --- test/unit/downloads/pixiv_test.rb | 2 +- test/unit/sources/pixiv_test.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/unit/downloads/pixiv_test.rb b/test/unit/downloads/pixiv_test.rb index 2c2b15c86..8c2e258ab 100644 --- a/test/unit/downloads/pixiv_test.rb +++ b/test/unit/downloads/pixiv_test.rb @@ -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 diff --git a/test/unit/sources/pixiv_test.rb b/test/unit/sources/pixiv_test.rb index 531beb05c..79a92e7aa 100644 --- a/test/unit/sources/pixiv_test.rb +++ b/test/unit/sources/pixiv_test.rb @@ -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