Skip to content

Commit 5fadcef

Browse files
ionelmcblueyed
authored andcommitted
Update assertions (#402)
Fixes #401.
1 parent 9972ec5 commit 5fadcef

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_database.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ def test_db_access_3(self):
175175
"*test_db_access_2 FAILED*",
176176
"*test_db_access_3 FAILED*",
177177
"*ERROR at setup of TestCase_setupClass.test_db_access_1*",
178-
"*Failed: Database access not allowed, use the \"django_db\" mark to enable*",
178+
'*Failed: Database access not allowed, use the "django_db" mark, '
179+
'or the "db" or "transactional_db" fixtures to enable it.',
179180
])
180181

181182

@@ -190,7 +191,8 @@ def test_db_access_in_conftest(self, django_testdir):
190191

191192
result = django_testdir.runpytest_subprocess('-v')
192193
result.stderr.fnmatch_lines([
193-
'*Failed: Database access not allowed, use the "django_db" mark to enable it.*',
194+
'*Failed: Database access not allowed, use the "django_db" mark, '
195+
'or the "db" or "transactional_db" fixtures to enable it.*',
194196
])
195197

196198
def test_db_access_in_test_module(self, django_testdir):
@@ -201,5 +203,6 @@ def test_db_access_in_test_module(self, django_testdir):
201203

202204
result = django_testdir.runpytest_subprocess('-v')
203205
result.stdout.fnmatch_lines([
204-
'*Failed: Database access not allowed, use the "django_db" mark to enable it.*',
206+
'*Failed: Database access not allowed, use the "django_db" mark, '
207+
'or the "db" or "transactional_db" fixtures to enable it.',
205208
])

0 commit comments

Comments
 (0)