@@ -201,19 +201,21 @@ def test_enabled(self, pytester):
201201 # To really check middleware reset, the tests must run in order,
202202 # so disable randomly.
203203 result = pytester .runpytest ("-svv" , "-p" , "no:randomly" )
204- result .assert_outcomes (passed = 4 , failed = 0 , errors = 0 )
204+ result .assert_outcomes (passed = 5 , failed = 0 , errors = 0 )
205205 # Look for the http_server_request event in test_app's appmap. If
206206 # middleware reset is broken, it won't be there.
207207 appmap_file = pytester .path / "tmp" / "appmap" / "pytest" / "test_request.appmap.json"
208- assert not os .path .exists (pytester .path / "tmp" / "appmap" / "requests" )
208+ assert not os .path .exists (
209+ pytester .path / "tmp" / "appmap" / "requests"
210+ ), "django tests generated request recordings"
209211
210212 events = json .loads (appmap_file .read_text ())["events" ]
211213 assert "http_server_request" in events [0 ]
212214
213215 def test_disabled (self , pytester , monkeypatch ):
214216 monkeypatch .setenv ("_APPMAP" , "false" )
215217 result = pytester .runpytest ("-svv" , "-p" , "no:randomly" , "-k" , "test_request" )
216- result .assert_outcomes (passed = 1 , failed = 0 , errors = 0 )
218+ result .assert_outcomes (passed = 2 , failed = 0 , errors = 0 )
217219 assert not (pytester .path / "tmp" ).exists ()
218220
219221 def test_disabled_for_process (self , pytester , monkeypatch ):
@@ -223,7 +225,7 @@ def test_disabled_for_process(self, pytester, monkeypatch):
223225
224226 # There are two tests for remote recording. They should both fail,
225227 # because process recording should disable remote recording.
226- result .assert_outcomes (passed = 2 , failed = 2 , errors = 0 )
228+ result .assert_outcomes (passed = 3 , failed = 2 , errors = 0 )
227229
228230 assert (pytester .path / "tmp" / "appmap" / "process" ).exists ()
229231 assert not (pytester .path / "tmp" / "appmap" / "requests" ).exists ()
0 commit comments