@@ -42,7 +42,9 @@ isa_ok($fh, 'IO::Socket::INET');
42
42
43
43
undef ($fh );
44
44
45
- is ($obj -> proxy(), undef );
45
+ # Note: this needs to handle cases when http_proxy is set in the environment
46
+
47
+ is ($obj -> proxy(), $ENV {http_proxy });
46
48
is_deeply([$obj -> authentication], []);
47
49
$obj -> proxy(' http' , $TEST_PROXY );
48
50
$obj -> authentication(@TEST_AUTHENTICATION );
@@ -58,7 +60,7 @@ isa_ok($fh, 'IO::Socket::INET');
58
60
59
61
undef ($fh );
60
62
61
- is (Bio::Root::HTTPget-> proxy(), undef );
63
+ is (Bio::Root::HTTPget-> proxy(), $ENV { http_proxy } );
62
64
is_deeply([Bio::Root::HTTPget-> authentication], []);
63
65
Bio::Root::HTTPget-> proxy(' http' , $TEST_PROXY );
64
66
Bio::Root::HTTPget-> authentication(@TEST_AUTHENTICATION );
@@ -78,7 +80,9 @@ undef($fh);
78
80
Bio::Root::HTTPget-> authentication(undef , undef );
79
81
80
82
my $old = Bio::Root::HTTPget-> clear_proxy(' http' );
81
- is (Bio::Root::HTTPget::proxy(), undef );
83
+
84
+ # Note this falls back to whatever $ENV{http_proxy} is set to
85
+ is (Bio::Root::HTTPget::proxy(), $ENV {http_proxy });
82
86
is ($old , $TEST_PROXY );
83
87
84
88
is_deeply([Bio::Root::HTTPget-> authentication], [undef , undef ]);
@@ -94,7 +98,7 @@ my $newobj = Bio::Root::HTTPget->new();
94
98
95
99
ok defined ($newobj ) && $obj -> isa(' Bio::Root::Root' );
96
100
97
- is ($newobj -> proxy(), undef );
101
+ is ($newobj -> proxy(), $ENV { http_proxy } );
98
102
is_deeply([$newobj -> authentication], []);
99
103
$newobj -> proxy(' http' , $TEST_PROXY );
100
104
$newobj -> authentication(@TEST_AUTHENTICATION );
0 commit comments