Revert "Removed Mitoprot support, a service that is not working anymore"
[bioperl-live.git] / t / Tools / Analysis / Protein / Mitoprot.t
blob5fe60e80fb6d806398050da5b97329441be3ba07
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 10,
11                -requires_modules => [qw(IO::String LWP::UserAgent)],
12                -requires_networking => 1);
14     use_ok 'Bio::Tools::Analysis::Protein::Mitoprot';
15     use_ok 'Bio::PrimarySeq';
16     use_ok 'Bio::WebAgent';
19 my $verbose = test_debug();
21 ok my $tool = Bio::WebAgent->new(-verbose =>$verbose);
23 my $seq = Bio::PrimarySeq->new(-seq => 'MSADQRWRQDSQDSFGDSFDGDSFFGSDFDGDS'
24                                      . 'DFGSDFGSDGDFGSDFGDSFGDGFSDRSRQDQRS',
25                                -display_id => 'test2');
27 ok $tool = Bio::Tools::Analysis::Protein::Mitoprot->new( -seq=>$seq);
28 SKIP: {
29     ok $tool->run();
30     skip( 'Server terminated with an error, skipping tests', 4 )
31         if (     $tool->status eq 'TERMINATED_BY_ERROR'
32             or   $tool->result =~ /Can't connect to/ );
33     ok my $raw = $tool->result('');
34     ok my $parsed = $tool->result('parsed');
35     is ($parsed->{'charge'}, -13);
36     ok my @res = $tool->result('Bio::SeqFeatureI');