villebro commented on a change in pull request #10556:
URL:
https://github.com/apache/incubator-superset/pull/10556#discussion_r467695987
##########
File path: tests/base_tests.py
##########
@@ -44,6 +44,26 @@
FAKE_DB_NAME = "fake_db_100"
+def login(client, username="admin", password="general"):
Review comment:
```suggestion
def login(client: Any, username: str = "admin", password: str = "general"):
```
(AFAIK there isn't a defined type for `TestCase.client`)
##########
File path: tests/base_tests.py
##########
@@ -44,6 +44,26 @@
FAKE_DB_NAME = "fake_db_100"
+def login(client, username="admin", password="general"):
+ resp = get_resp(client, "/login/", data=dict(username=username,
password=password))
+ assert "User confirmation needed" not in resp
+
+
+def get_resp(
+ client, url, data=None, follow_redirects=True, raise_on_error=True,
json_=None
Review comment:
```suggestion
client: Any, url: str, data: Any = None, follow_redirects: bool = True,
raise_on_error: bool = True, json_: Optional[str] = None
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]