<commit_before>#!/usr/bin/env perl

use lib 't/lib';

use Test::More;
use Test::Exception;
use Paws;
use TestRequestCaller;

Paws->default_config->caller(TestRequestCaller->new);

{
  my $svc = Paws->service('SQS', endpoint => 'http://localhost:6000', region => 'eu-west-1');

  isa_ok($svc->endpoint, 'URI');
  cmp_ok($svc->endpoint_host, 'eq', 'localhost');
  cmp_ok($svc->_api_endpoint, 'eq', 'http://localhost:6000');

  my $ro = $svc->DeleteQueue(QueueUrl => 'xxx');
 
  cmp_ok($ro->url, 'eq', 'http://localhost:6000/');
  like($ro->headers->header('authorization'), qr|/eu-west-1/|, 'found correct region in the authorization header');
}

{
  throws_ok(sub {
    my $svc = Paws->service('SQS', endpoint => 'http://localhost:6000');
  }, 'Paws::Exception', 'Throws an exception because SQS needs a region');
}
<commit_msg>Test failing in travis due to "no credentials found"<commit_after>#!/usr/bin/env perl

use lib 't/lib';

use Test::More;
use Test::Exception;
use Paws;
use TestRequestCaller;

Paws->default_config->caller(TestRequestCaller->new);
Paws->default_config->credentials('Test::CustomCredentials');

{
  my $svc = Paws->service('SQS', endpoint => 'http://localhost:6000', region => 'eu-west-1');

  isa_ok($svc->endpoint, 'URI');
  cmp_ok($svc->endpoint_host, 'eq', 'localhost');
  cmp_ok($svc->_api_endpoint, 'eq', 'http://localhost:6000');

  my $ro = $svc->DeleteQueue(QueueUrl => 'xxx');
 
  cmp_ok($ro->url, 'eq', 'http://localhost:6000/');
  like($ro->headers->header('authorization'), qr|/eu-west-1/|, 'found correct region in the authorization header');
}

{
  throws_ok(sub {
    my $svc = Paws->service('SQS', endpoint => 'http://localhost:6000');
  }, 'Paws::Exception', 'Throws an exception because SQS needs a region');
}

{'fraction_non_alphanumeric': 0.2091168091168091, 'fraction_numerical': 0.020512820512820513, 'mean_word_length': 5.226950354609929, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2817271', 'n_tokens_mistral': 672, 'n_tokens_neox': 622, 'n_words': 129}