File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 1- import os
2- import sys
3-
41def test_mark_rolls_back_db_updates (db_testdir ):
52 '''
63 Test that the mark can successfully roll back any database transactions
74 triggered by a test.
85 '''
9- # The Testdir fixture appears to alter sys.path such that the import path
10- # finder starts at the parent directory -- adjust this behavior so that we
11- # can perform relative imports
12- sys .path .append (os .getcwd ())
13-
146 db_testdir .makeini ("""
157 [pytest]
16- mocked-sessions=database.db.session
8+ mocked-sessions=test_mark_rolls_back_db_updates0. database.db.session
179 """ )
1810
1911 db_testdir .makepyfile (__init__ = '' )
@@ -25,7 +17,7 @@ def test_mark_rolls_back_db_updates(db_testdir):
2517 """ )
2618
2719 db_testdir .makepyfile ("""
28- from database import db
20+ from . database import db
2921 import pytest
3022
3123 @pytest.mark.transactional
You can’t perform that action at this time.
0 commit comments