Skip to content

Commit ec6309d

Browse files
missing "
1 parent b162eef commit ec6309d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/appsec/integrations/django_tests/test_appsec_django.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_request_block_request_callable(client, test_spans, tracer):
5757
assert result.status_code == 403
5858
body = result.content.decode()
5959
body_parsed = re.sub(
60-
r'"security_response_id":"[-0-9a-z]+"', r'"security_response_id":[security_response_id]', body
60+
r'"security_response_id":"[-0-9a-z]+"', r'"security_response_id":"[security_response_id]"', body
6161
)
6262
assert body_parsed == constants.BLOCKED_RESPONSE_JSON
6363
assert root.get_tag(http.STATUS_CODE) == "403"
@@ -122,9 +122,9 @@ def test_request_userblock_403(client, test_spans, tracer):
122122
assert result.status_code == 403
123123
body = result.content.decode()
124124
body_parsed = re.sub(
125-
r'"security_response_id":"[-0-9a-z]+"', r'"security_response_id":[security_response_id]', body
125+
r'"security_response_id":"[-0-9a-z]+"', r'"security_response_id":"[security_response_id]"', body
126126
)
127-
assert body_parsed == constants.BLOCKED_RESPONSE_JSON
127+
assert body_parsed == constants.BLOCKED_RESPONSE_JSON, (body_parsed, constants.BLOCKED_RESPONSE_JSON)
128128
assert root.get_tag(http.STATUS_CODE) == "403"
129129
assert root.get_tag(http.URL) == "http://testserver/appsec/checkuser/%s/" % _BLOCKED_USER
130130
assert root.get_tag(http.METHOD) == "GET"

tests/contrib/django/test_django_appsec_snapshots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,6 @@ def test_request_ipblock_match_403_json():
245245
assert result.status_code == 403
246246
body = result.content.decode()
247247
body_parsed = re.sub(
248-
r'"security_response_id":"[-0-9a-z]+"', r'"security_response_id":[security_response_id]', body
248+
r'"security_response_id":"[-0-9a-z]+"', r'"security_response_id":"[security_response_id]"', body
249249
)
250250
assert body_parsed == constants.BLOCKED_RESPONSE_JSON

0 commit comments

Comments
 (0)