Skip to content

Commit

Permalink
Use correctly formatted regex
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Dec 6, 2024
1 parent a6f7cb7 commit be27bf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test_app/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import random
import re
from collections import defaultdict
from datetime import datetime, timedelta
from unittest import mock
Expand Down Expand Up @@ -55,7 +56,7 @@ def test_migrations_okay(*args, **kwargs):

migration_module = app_config.module.migrations
for step in dir(migration_module):
if not step.startswith('00'):
if not re.match(r'\d\d\d\d_', step):
continue
step_module = getattr(migration_module, step)
migration_name = step_module.__name__.rsplit('.')[-1]
Expand Down

0 comments on commit be27bf3

Please sign in to comment.