Skip to content

Commit be27bf3

Browse files
committed
Use correctly formatted regex
1 parent a6f7cb7 commit be27bf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test_app/tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import random
2+
import re
23
from collections import defaultdict
34
from datetime import datetime, timedelta
45
from unittest import mock
@@ -55,7 +56,7 @@ def test_migrations_okay(*args, **kwargs):
5556

5657
migration_module = app_config.module.migrations
5758
for step in dir(migration_module):
58-
if not step.startswith('00'):
59+
if not re.match(r'\d\d\d\d_', step):
5960
continue
6061
step_module = getattr(migration_module, step)
6162
migration_name = step_module.__name__.rsplit('.')[-1]

0 commit comments

Comments
 (0)