Forráskód Böngészése

[proxy] Changed login to make_logged_in_client with is_superuser=True in proxy_test (#1158)

Co-authored-by: Romain Rigaux <romain.rigaux@gmail.com>
Sungpeo Kook 5 éve
szülő
commit
711ebe31d8
1 módosított fájl, 2 hozzáadás és 5 törlés
  1. 2 5
      apps/proxy/src/proxy/proxy_test.py

+ 2 - 5
apps/proxy/src/proxy/proxy_test.py

@@ -100,9 +100,8 @@ def test_proxy_get():
   """
   Proxying test.
   """
-  client = Client()
   # All apps require login.
-  client.login(username="test", password="test")
+  client = make_logged_in_client(username="test", is_superuser=True)
   httpd, finish = run_test_server()
   try:
     # Test the proxying
@@ -128,9 +127,7 @@ def test_proxy_post():
   """
   Proxying test, using POST.
   """
-  client = Client()
-  # All apps require login.
-  client.login(username="test", password="test")
+  client = make_logged_in_client(username="test", is_superuser=True)
   httpd, finish = run_test_server()
   try:
     # Test the proxying