44
55
66def test_ping_spam ():
7- client = httpx .Client (base_url = "http://localhost:2375" , auth = ("app_api_haproxy_user" , "some_secure_password " ))
7+ client = httpx .Client (base_url = "http://localhost:2375" , auth = ("app_api_haproxy_user" , "some secure password " ))
88 for i in range (100 ):
99 r = client .get ("_ping" )
1010 assert r .status_code == 200
@@ -13,7 +13,7 @@ def test_ping_spam():
1313def test_volume_creation_removal ():
1414 volume_name = "nc_app_test_data"
1515 httpx .post ("http://localhost:2375/volumes/create" ,
16- auth = ("app_api_haproxy_user" , "some_secure_password " ),
16+ auth = ("app_api_haproxy_user" , "some secure password " ),
1717 json = {"name" : volume_name })
1818 httpx .delete (
1919 f"http://localhost:2375/volumes/{ volume_name } " ,
@@ -26,23 +26,23 @@ def test_volume_creation_removal_invalid():
2626 for i in range (30 ):
2727 r = httpx .post (
2828 "http://localhost:2375/volumes/create" ,
29- auth = ("app_api_haproxy_user" , "some_secure_password " ),
29+ auth = ("app_api_haproxy_user" , "some secure password " ),
3030 json = {"name" : volume_name },
3131 )
3232 assert r .status_code == 403
3333 r = httpx .delete (f"http://localhost:2375/volumes/{ volume_name } " ,
34- auth = ("app_api_haproxy_user" , "some_secure_password " ))
34+ auth = ("app_api_haproxy_user" , "some secure password " ))
3535 assert r .status_code == 403
3636
3737
3838def test_invalid_url ():
39- client = httpx .Client (base_url = "http://localhost:2375" , auth = ("app_api_haproxy_user" , "some_secure_password " ))
39+ client = httpx .Client (base_url = "http://localhost:2375" , auth = ("app_api_haproxy_user" , "some secure password " ))
4040 for i in range (50 ):
4141 client .get ("_unknown" )
4242
4343
4444def test_autoban ():
45- client = httpx .Client (base_url = "http://localhost:2375" , auth = ("app_api_haproxy_user" , "some_secure_password1 " ))
45+ client = httpx .Client (base_url = "http://localhost:2375" , auth = ("app_api_haproxy_user" , "some secure password1 " ))
4646 with pytest .raises (httpx .ReadTimeout ):
4747 for i in range (10 ):
4848 client .get ("_ping" )
@@ -56,7 +56,7 @@ def test_non_standard_port():
5656 try :
5757 misc .start_haproxy (port = 12375 )
5858 misc .wait_heartbeat ()
59- r = httpx .get ("http://localhost:12375/_ping" , auth = ("app_api_haproxy_user" , "some_secure_password " ))
59+ r = httpx .get ("http://localhost:12375/_ping" , auth = ("app_api_haproxy_user" , "some secure password " ))
6060 assert r .status_code == 200
6161 finally :
6262 misc .remove_haproxy ()
0 commit comments