Skip to content

Commit 3e8c629

Browse files
committed
tests/contrib/django: use proper mock
The read mock should take at least an argument. Fixes: tests.contrib.django.fixtures.TempStoreClient:client.py:151 Can't capture request body: test_post_read_error_logging.<locals>.read() takes 0 positional arguments but 1 was given Assisted-by: Cursor
1 parent 071203e commit 3e8c629

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/contrib/django/django_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ def test_post_raw_data(django_elasticapm_client):
572572
def test_post_read_error_logging(django_elasticapm_client, caplog, rf):
573573
request = rf.post("/test", data="{}", content_type="application/json")
574574

575-
def read():
575+
def read(*args, **kwargs):
576576
raise IOError("foobar")
577577

578578
request.read = read

0 commit comments

Comments
 (0)