Skip to content

Commit

Permalink
Update assertions (#402)
Browse files Browse the repository at this point in the history
Fixes #401.
  • Loading branch information
ionelmc authored and blueyed committed Oct 14, 2016
1 parent 9972ec5 commit 5fadcef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_database.py
Expand Up @@ -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.',
])


Expand All @@ -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):
Expand All @@ -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.',
])

0 comments on commit 5fadcef

Please sign in to comment.