1
0
Fork 0
mirror of https://github.com/Findus23/acronomy.git synced 2024-09-19 15:33:45 +02:00

add test for uppercase first letter

This commit is contained in:
Lukas Winkler 2020-07-26 14:58:25 +02:00
parent ad2687db46
commit 9eb19c79bd
Signed by: lukas
GPG key ID: 54DE4D798D244853

View file

@ -38,3 +38,14 @@ class LetterCheck(BaseCheck):
registry.register(LetterCheck)
class FullNameCheck(BaseCheck):
def run(self):
for acronym in Acronym.objects.all():
first_letter = acronym.full_name[0]
if first_letter.islower():
yield CheckInfo(f"first letter of full name should be uppercase ({acronym.full_name})")
registry.register(FullNameCheck)