Skip to content

Commit 2ccb5bf

Browse files
Replacing Fixtures with Constants
1 parent 773fedc commit 2ccb5bf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/unit/email/test_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_compute_recipient(user, address, expected):
7474
(None, None, "127.0.0.1", True),
7575
],
7676
)
77-
def test_redact_ip(unauthenticated_userid, user, expected):
77+
def test_redact_ip(unauthenticated_userid, user, remote_addr, expected):
7878
user_email = pretend.stub(user_id="the_users_id")
7979

8080
request = pretend.stub(
@@ -85,7 +85,7 @@ def test_redact_ip(unauthenticated_userid, user, expected):
8585
filter=lambda a: pretend.stub(one=lambda: user_email)
8686
)
8787
),
88-
remote_addr=REMOTE_ADDR,
88+
remote_addr=remote_addr,
8989
)
9090
assert email._redact_ip(request, user_email) == expected
9191

tests/unit/forklift/test_legacy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4398,6 +4398,7 @@ def test_upload_new_project_fails_ratelimited(
43984398
db_request,
43994399
project_service,
44004400
failing_limiter,
4401+
remote_addr,
44014402
):
44024403
user = UserFactory.create()
44034404
EmailFactory.create(user=user)
@@ -4420,7 +4421,7 @@ def test_upload_new_project_fails_ratelimited(
44204421
),
44214422
}
44224423
)
4423-
db_request.remote_addr = REMOTE_ADDR
4424+
db_request.remote_addr = remote_addr
44244425

44254426
project_service.ratelimiters[failing_limiter] = pretend.stub(
44264427
test=lambda *a, **kw: False,

0 commit comments

Comments
 (0)