Beispiel #1
0
 def test_spec_char_title(self):
     try:
         res = check_day_title('Day00 - abcdefghijklmnopqrstuvwxyz?')
         assert res == True
     except Exception as e:
         assert str(
             e) == '[Error] :: invalid day title chars ([A-Za-z -] allowed)'
Beispiel #2
0
 def test_empty_title(self):
     try:
         res = check_day_title('')
         assert res == True
     except Exception as e:
         assert str(
             e
         ) == '[Error] :: invalid day title length ! (length must be between 11 and 40)'
Beispiel #3
0
 def test_format_title(self):
     try:
         res = check_day_title('Day - abcdefghijklmnopqrstuvwxyz?')
         assert res == True
     except Exception as e:
         assert str(
             e
         ) == '[Error] :: invalid day title ! (it must be formatted as follows \"DayXX - ...\")'
Beispiel #4
0
 def test_long_title(self):
     try:
         res = check_day_title(
             'Day00 - abcdefghijklmnopqrstuvwxyz0123456789')
         assert res == True
     except Exception as e:
         assert str(
             e
         ) == '[Error] :: invalid day title length ! (length must be between 11 and 40)'
Beispiel #5
0
 def test_title_ok_2(self):
     try:
         res = check_day_title('Day01 - Elasticsearch Logstash Kibana')
         assert res == True
     except Exception as e:
         assert str(e) == ''
Beispiel #6
0
 def test_title_ok_1(self):
     try:
         res = check_day_title('Day00 - PostgreSQL')
         assert res == True
     except Exception as e:
         assert str(e) == ''