Skip to content

Commit 93dabf2

Browse files
committed
TestLiveServer: remove xfail with test_item
The `live_server` fixture is expected to auto-use/-inject the `transactional_db` fixture, via `_live_server_helper`.
1 parent aeb3bda commit 93dabf2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/test_fixtures.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,11 @@ def test_fixture_transactional_db(self, transactional_db, live_server):
118118

119119
@pytest.fixture
120120
def item(self):
121-
# This has not requested database access so should fail.
122-
# Unfortunately the _live_server_helper autouse fixture makes this
123-
# test work.
124-
with pytest.raises(pytest.fail.Exception):
125-
Item.objects.create(name='foo')
121+
# This has not requested database access explicitly, but the
122+
# live_server fixture auto-uses the transactional_db fixture.
123+
Item.objects.create(name='foo')
126124

127-
@pytest.mark.xfail
128125
def test_item(self, item, live_server):
129-
# test should fail/pass in setup
130126
pass
131127

132128
@pytest.fixture

0 commit comments

Comments
 (0)