Fixed server mode api test case failure.

This commit is contained in:
Ashesh Vashi
2021-06-24 19:41:58 +05:30
committed by Akshay Joshi
parent 9574f43f87
commit cfb68d73a0
6 changed files with 15 additions and 13 deletions

View File

@@ -76,6 +76,10 @@ class TestClient(testing.FlaskClient):
b' value="([^"]*)">', res.data
)
if m is None:
# When login through Kerberos, we won't find the CSRF
return None
return m.group(1).decode("utf-8")
def generate_csrf_token(self, *args, **kwargs):