-foreach my $mod (@mods) {
- eval "require $mod";
- plan skip_all => "$mod missing for psgi_multipart_not.t" if $@;
-}
-use_ok($_) for @mods;
-use_ok 'PublicInbox::V2Writable';
-my $repo = tempdir('pi-psgi-multipart-not.XXXXXX', TMPDIR => 1, CLEANUP => 1);
-my $ibx = PublicInbox::Inbox->new({
- inboxdir => $repo,
- name => 'multipart-not',
- version => 2,
- -primary_address => 'test@example.com',
-});
-my $im = PublicInbox::V2Writable->new($ibx, 1);
-$im->{parallel} = 0;
-
-my $mime = PublicInbox::MIME->new(<<'EOF');
+require_mods(@mods);
+use_ok($_) for (qw(HTTP::Request::Common Plack::Test));
+use_ok 'PublicInbox::WWW';
+my $ibx = create_inbox 'v2', version => 2, sub {
+ my ($im) = @_;
+ $im->add(PublicInbox::Eml->new(<<'EOF')) or BAIL_OUT;