コード例 #1
0
 def test_elb_name(self):
     for b in ['a', 'a-a', 'aaa', 'a'*32,
               'wick3d-elb-name', 'Wick3d-ELB-Name']:
         elb_name(b)
     for b in ['a'*33, 'invalid_elb', '-invalid-elb',
               'invalid-elb-', '-elb-', '-a', 'a-']:
         with self.assertRaises(ValueError):
             elb_name(b)
コード例 #2
0
ファイル: test_validators.py プロジェクト: krayr/troposphere
 def test_elb_name(self):
     for b in ['a', 'a-a', 'aaa', 'a'*32,
               'wick3d-elb-name', 'Wick3d-ELB-Name']:
         elb_name(b)
     for b in ['a'*33, 'invalid_elb', '-invalid-elb',
               'invalid-elb-', '-elb-', '-a', 'a-']:
         with self.assertRaises(ValueError):
             elb_name(b)
コード例 #3
0
 def test_elb_name(self):
     for b in ["a", "a-a", "aaa", "a" * 32, "wick3d-elb-name", "Wick3d-ELB-Name"]:
         elb_name(b)
     for b in [
         "a" * 33,
         "invalid_elb",
         "-invalid-elb",
         "invalid-elb-",
         "-elb-",
         "-a",
         "a-",
     ]:
         with self.assertRaises(ValueError):
             elb_name(b)