You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Barry Hoggard <ba...@tristanmedia.com> on 2004/03/25 22:06:02 UTC
How do I test modules with file upload code? (mp1)
Is Apache::Test the best way to test a module that receives an
Apache::Request object after an upload form submit?
It will be a utility module based on
Data::FormValidator::Constraints::Upload, and I'm wondering if there is
a way to test it without having a test server running. It is not a
handler, but a module to be used by my HTML::Mason code to verify type,
size, etc.
I'm not sure I can use Apache::FakeRequest for things like upload data.
--
Barry Hoggard
Tristan Media LLC
w: www.tristanmedia.com
aim: hoggardb
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: How do I test modules with file upload code? (mp1)
Posted by Stas Bekman <st...@stason.org>.
Barry Hoggard wrote:
> Is Apache::Test the best way to test a module that receives an
> Apache::Request object after an upload form submit?
>
> It will be a utility module based on
> Data::FormValidator::Constraints::Upload, and I'm wondering if there is
> a way to test it without having a test server running. It is not a
> handler, but a module to be used by my HTML::Mason code to verify type,
> size, etc.
>
> I'm not sure I can use Apache::FakeRequest for things like upload data.
No, Apache::FakeRequest is very limited. Yes, Apache::Test is the way to go.
modper-2.0 test suite includes heaps of upload tests that you can copy from.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html