Beispiel #1
0
 def test_hyphen(self):
     """
     Test case for a name with an asterisk.
     """
     try:
         db_name_validator('logstash-')
     except ValidationError:
         self.fail('Name raised ValidationError unexpectedly')
Beispiel #2
0
 def test_underscore(self):
     """
     Test case for a name that contains an underscore.
     """
     try:
         db_name_validator('logstash_')
     except ValidationError:
         self.fail('Name raised ValidationError unexpectedly')
Beispiel #3
0
 def test_ends_with_dollar_sign(self):
     """
     Test case for a name that ends with '$'.
     """
     try:
         db_name_validator('id$')
     except ValidationError:
         self.fail('Name raised ValidationError unexpectedly')
Beispiel #4
0
 def test_period(self):
     """
     Test case for a name with a period.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('http.log')
Beispiel #5
0
 def test_white_space(self):
     """
     Test case for a name with a space.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('http log')
Beispiel #6
0
 def test_at_sign(self):
     """
     Test case for a field name with an 'at' sign.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('@timestamp')
Beispiel #7
0
 def test_asterisk(self):
     """
     Test case for a name with an asterisk.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('logstash*')
Beispiel #8
0
 def test_ends_with_dollar_sign(self):
     """
     Test case for a name that ends with '$'.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('id$')
Beispiel #9
0
 def test_starts_with_dollar_sign(self):
     """
     Test case for a name that starts with '$'.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('$id')