Replaced "my_user" and "my_pass" with USERNAME and PASSWORD in the examples of the test client in the documentation, to avoid GitGuardian from detecting them as real passwords.
This commit is contained in:
parent
79abdc9cde
commit
514e9255aa
@ -350,7 +350,7 @@ A unittest Test Case
|
|||||||
response = self.client.get("/admin")
|
response = self.client.get("/admin")
|
||||||
self.assertEqual(response.status_code, 401)
|
self.assertEqual(response.status_code, 401)
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=(USERNAME, PASSWORD))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
|
||||||
@ -382,7 +382,7 @@ A pytest Test
|
|||||||
response = client.get("/admin")
|
response = client.get("/admin")
|
||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
response = client.get(
|
response = client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=(USERNAME, PASSWORD))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ A unittest Test Case
|
|||||||
response = self.client.get("/admin")
|
response = self.client.get("/admin")
|
||||||
self.assertEqual(response.status_code, 401)
|
self.assertEqual(response.status_code, 401)
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=(USERNAME, PASSWORD))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
|
||||||
@ -264,5 +264,5 @@ A pytest Test
|
|||||||
response = client.get("/admin")
|
response = client.get("/admin")
|
||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
response = client.get(
|
response = client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=(USERNAME, PASSWORD))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
@ -51,7 +51,7 @@ class Client(WerkzeugClient):
|
|||||||
response = self.client.get("/admin")
|
response = self.client.get("/admin")
|
||||||
self.assertEqual(response.status_code, 401)
|
self.assertEqual(response.status_code, 401)
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=(USERNAME, PASSWORD))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
For pytest_:
|
For pytest_:
|
||||||
@ -76,7 +76,7 @@ class Client(WerkzeugClient):
|
|||||||
response = client.get("/admin")
|
response = client.get("/admin")
|
||||||
assert response.status_code == 401
|
assert response.status_code == 401
|
||||||
response = client.get(
|
response = client.get(
|
||||||
"/admin", digest_auth=("my_name", "my_pass"))
|
"/admin", digest_auth=(USERNAME, PASSWORD))
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
.. _unittest: https://docs.python.org/3/library/unittest.html
|
.. _unittest: https://docs.python.org/3/library/unittest.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user