Remove unused test module.
Patch by kareila.
diffs (147 lines):
diff -r 6eea5d364d26 -r fc25a44a652e cgi-bin/LJ/Test/AtomAPI.pm
--- a/cgi-bin/LJ/Test/AtomAPI.pm Tue Jun 15 17:26:16 2010 +0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-# This code was forked from the LiveJournal project owned and operated
-# by Live Journal, Inc. The code has been modified and expanded by
-# Dreamwidth Studios, LLC. These files were originally licensed under
-# the terms of the license supplied by Live Journal, Inc, which can
-# currently be found at:
-#
-#
http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt
-#
-# In accordance with the original license, this code and all its
-# modifications are provided under the GNU General Public License.
-# A copy of that license can be found in the LICENSE file included as
-# part of this distribution.
-
-package LJ::Test::AtomAPI;
-
-use strict;
-use warnings;
-
-use lib "$LJ::HOME/cgi-bin";
-
-use Test::FakeApache;
-
-require "modperl.pl";
-
-use Carp ();
-use DBI;
-use LJ::Test;
-
-use HTTP::Request;
-
-use List::Util qw(first);
-
-use XML::Atom::Client;
-use XML::Atom::Entry;
-use XML::Atom::Feed;
-
-use bytes ();
-
-sub new {
- my $class = shift;
- my $self = bless {}, (ref $class || $class);
-
- $self->{apache} = LJ::Test->fake_apache;
- my $client = $self->{client} = XML::Atom::Client->new;
-
- $client->username('ads');
- $client->password('ads');
-
- return $self;
-}
-
-sub base_uri {
- return "$LJ::SITEROOT/interface/atom";
-}
-
-sub post_uri {
- my $self = shift;
-
- my $feed = $self->fetch_feed($self->base_uri);
-
- foreach my $link ($feed->links) {
- return $link->href if $link->rel eq 'service.post';
- }
-
- Carp::croak("Unable to find service.post link");
-}
-
-sub fetch_feed {
- my $self = shift;
- my $uri = shift;
- my $res = $self->atom_run(GET => $uri);
- return XML::Atom::Feed->new(Stream => \$res->content);
-}
-
-sub fetch_entry {
- my $self = shift;
- my $uri = shift;
- my $res = $self->atom_run(GET => $uri);
- return XML::Atom::Entry->new(Stream => \$res->content);
-}
-
-sub post_entry {
- my $self = shift;
- my $uri = shift;
- my $entry = shift;
-
- return $self->atom_run(POST => $uri, $entry);
-}
-
-sub atom_run {
- my $self = shift;
- my ($method, $uri, $obj) = @_;
-
- my $a = $self->{apache};
-
- my $req;
-
- if ($obj) {
- my $content = $obj->as_xml;
- $req = HTTP::Request->new($method, $uri,
- [
- 'Content-Length', bytes::length($content),
- 'Content-Type', "application/x.atom+xml",
- ], $content);
- } else {
- $req = HTTP::Request->new($method, $uri);
- }
-
- my $client = $self->{client};
-
- $client->munge_request($req);
-
- if ($ENV{DEBUG}) {
- print "****** START REQUEST ******\n";
- print $req->as_string;
- print "****** END REQUEST ******\n";
- }
-
- my $res = $a->run($req);
-
- $client->munge_response($res);
-
- if ($ENV{DEBUG}) {
- print "****** START RESPONSE ******\n";
- print $res->as_string;
- print "****** END RESPONSE ******\n";
- }
-
- return $res;
-}
-
-1;
diff -r 6eea5d364d26 -r fc25a44a652e t/00-compile.t
--- a/t/00-compile.t Tue Jun 15 17:26:16 2010 +0800
+++ b/t/00-compile.t Tue Jun 15 17:31:53 2010 +0800
@@ -17,7 +17,6 @@ my %SKIP = (
'LJ/LDAP.pm' => 'bug 1788 needs Net::LDAP',
'LJ/ConfCheck/General.pm' => 'needs to be integrated into LJ::ConfCheck',
- 'LJ/Test/AtomAPI.pm' => 'fix Test/FakeApache.pm',
'Test/FakeApache.pm' => 'needs Apache::Constants',
'Apache/CompressClientFixup.pm' => 'needs Apache::Constants',
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog