iScsc / blog.iscsc.fr

GNU General Public License v3.0
0 stars 7 forks source link

Fix `new_article.py` script to handle file name containing an Upper Case letter #59

Closed ctmbl closed 5 months ago

ctmbl commented 5 months ago

at the time of the first commit the pytest should fail (expected) , the goal of future commits is to make this test pass: this is test-driven development: https://github.com/iScsc/blog.iscsc.fr/actions/runs/8959711589/job/24605420043?pr=59

This first push also highlighted a mistake in the test formulation:

  -         'date': '2024-05-05T12:00:00+02:00',
  ?                            ^
  +         'date': '2024-05-05 12:00:00+02:00',
  ?                            ^
            'draft': False,
  -         'lastUpdate': '2024-05-05T12:00:00+02:00',
  ?                                  ^
  +         'lastUpdate': '2024-05-05 12:00:00+02:00',
  ?                                  ^

The date is wrongly formated

ctmbl commented 5 months ago

the wrongly formated test is fixed in 859ead1

See https://github.com/iScsc/blog.iscsc.fr/actions/runs/8959725124/job/24605452002?pr=59

The diff is fine:

   -         'url': 'https://iscsc.fr/posts/article-2',
  ?                                        ^
  +         'url': 'https://iscsc.fr/posts/Article-2',
  ?            
ctmbl commented 5 months ago

Pytest passes : https://github.com/iScsc/blog.iscsc.fr/actions/runs/8959744363/job/24605495739?pr=59

✅ this can be merged