Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 4
0
 def test_period(self):
     """
     Test case for a name with a period.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('http.log')
Ejemplo n.º 5
0
 def test_white_space(self):
     """
     Test case for a name with a space.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('http log')
Ejemplo n.º 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')
Ejemplo n.º 7
0
 def test_asterisk(self):
     """
     Test case for a name with an asterisk.
     """
     with self.assertRaises(ValidationError):
         db_name_validator('logstash*')
Ejemplo n.º 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$')
Ejemplo n.º 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')