Esempio n. 1
0
 def test_s3_bucket_name(self):
     for b in ['a' * 3, 'a' * 63, 'wick3d-sweet.bucket']:
         s3_bucket_name(b)
     for b in ['a' * 2, 'a' * 64, 'invalid_bucket', 'InvalidBucket']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in ['.invalid', 'invalid.', 'invalid..bucket']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in ['1.2.3.4', '11.22.33.44', '111.222.333.444']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
Esempio n. 2
0
 def test_s3_bucket_name(self):
     for b in ["a" * 3, "a" * 63, "wick3d-sweet.bucket"]:
         s3_bucket_name(b)
     for b in ["a" * 2, "a" * 64, "invalid_bucket", "InvalidBucket"]:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in [".invalid", "invalid.", "invalid..bucket"]:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in ["1.2.3.4", "11.22.33.44", "111.222.333.444"]:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
Esempio n. 3
0
 def test_s3_bucket_name(self):
     for b in ['a'*3, 'a'*63, 'wick3d-sweet.bucket']:
         s3_bucket_name(b)
     for b in ['a'*2, 'a'*64, 'invalid_bucket', 'InvalidBucket']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in ['.invalid', 'invalid.', 'invalid..bucket']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in ['1.2.3.4', '11.22.33.44', '111.222.333.444']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
Esempio n. 4
0
 def test_s3_bucket_name(self):
     for b in ["a" * 3, "a" * 63, "wick3d-sweet.bucket"]:
         s3_bucket_name(b)
     for b in ["a" * 2, "a" * 64, "invalid_bucket", "InvalidBucket"]:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in [".invalid", "invalid.", "invalid..bucket"]:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
     for b in ["1.2.3.4", "11.22.33.44", "111.222.333.444"]:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
Esempio n. 5
0
 def test_s3_bucket_name(self):
     for b in ['a' * 3, 'a' * 63, 'wick3d-sweet.bucket']:
         s3_bucket_name(b)
     for b in ['a' * 2, 'a' * 64, 'invalid_bucket']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)
Esempio n. 6
0
 def test_s3_bucket_name(self):
     for b in ['a'*3, 'a'*63, 'wick3d-sweet.bucket']:
         s3_bucket_name(b)
     for b in ['a'*2, 'a'*64, 'invalid_bucket']:
         with self.assertRaises(ValueError):
             s3_bucket_name(b)