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')
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')
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')
def test_period(self): """ Test case for a name with a period. """ with self.assertRaises(ValidationError): db_name_validator('http.log')
def test_white_space(self): """ Test case for a name with a space. """ with self.assertRaises(ValidationError): db_name_validator('http log')
def test_at_sign(self): """ Test case for a field name with an 'at' sign. """ with self.assertRaises(ValidationError): db_name_validator('@timestamp')
def test_asterisk(self): """ Test case for a name with an asterisk. """ with self.assertRaises(ValidationError): db_name_validator('logstash*')
def test_ends_with_dollar_sign(self): """ Test case for a name that ends with '$'. """ with self.assertRaises(ValidationError): db_name_validator('id$')
def test_starts_with_dollar_sign(self): """ Test case for a name that starts with '$'. """ with self.assertRaises(ValidationError): db_name_validator('$id')