Committer: nnikulochkina
LJSUP-13330: XMLRPC tests actualization
U trunk/cgi-bin/LJ/Test.pm
Modified: trunk/cgi-bin/LJ/Test.pm
===================================================================
--- trunk/cgi-bin/LJ/Test.pm 2012-12-12 08:52:36 UTC (rev 23458)
+++ trunk/cgi-bin/LJ/Test.pm 2012-12-12 10:19:31 UTC (rev 23459)
@@ -114,6 +114,8 @@
$opts{'email'} = 'do-not-reply@livejournal.com'
unless defined $opts{'email'};
+ $opts{'friends'} ||= [];
+
my $u;
if ( $journaltype eq 'P' ) {
@@ -154,6 +156,15 @@
return $u;
}
+
+sub add_friend {
+ my ($class, $uname, $fname) = @_;
+ my $u = LJ::load_user($uname) || die "Can't load user '$uname'";
+ my $f = LJ::load_user($fname) || die "Can't load user '$fname'";
+
+ $u->add_friend($f);
+}
+
sub temp_user {
shift() if $_[0] eq __PACKAGE__;
my %args = @_;