From 5fadcefbd5ca462fe96c17497d5f26c0d1d9d47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 14 Oct 2016 20:39:46 +0300 Subject: [PATCH] Update assertions (#402) Fixes #401. --- tests/test_database.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_database.py b/tests/test_database.py index 90ad58113..c8d4b511f 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -175,7 +175,8 @@ def test_db_access_3(self): "*test_db_access_2 FAILED*", "*test_db_access_3 FAILED*", "*ERROR at setup of TestCase_setupClass.test_db_access_1*", - "*Failed: Database access not allowed, use the \"django_db\" mark to enable*", + '*Failed: Database access not allowed, use the "django_db" mark, ' + 'or the "db" or "transactional_db" fixtures to enable it.', ]) @@ -190,7 +191,8 @@ def test_db_access_in_conftest(self, django_testdir): result = django_testdir.runpytest_subprocess('-v') result.stderr.fnmatch_lines([ - '*Failed: Database access not allowed, use the "django_db" mark to enable it.*', + '*Failed: Database access not allowed, use the "django_db" mark, ' + 'or the "db" or "transactional_db" fixtures to enable it.*', ]) def test_db_access_in_test_module(self, django_testdir): @@ -201,5 +203,6 @@ def test_db_access_in_test_module(self, django_testdir): result = django_testdir.runpytest_subprocess('-v') result.stdout.fnmatch_lines([ - '*Failed: Database access not allowed, use the "django_db" mark to enable it.*', + '*Failed: Database access not allowed, use the "django_db" mark, ' + 'or the "db" or "transactional_db" fixtures to enable it.', ])