Esempio n. 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)'
Esempio n. 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)'
Esempio n. 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 - ...\")'
Esempio n. 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)'
Esempio n. 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) == ''
Esempio n. 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) == ''