You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/08/08 18:58:28 UTC

[GitHub] [incubator-superset] bkyryliuk opened a new pull request #10556: chore: clean up csv tests

bkyryliuk opened a new pull request #10556:
URL: https://github.com/apache/incubator-superset/pull/10556


   Couple things done here:
   1. moved csv tests into a separate module
   2. made tests pytest friendly, removed unneeded dependencies
   3. moved common setup logic into the fixtures
   4. added table cleanup & moved db mutations to the newly defined database object


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on a change in pull request #10556: chore: clean up csv tests

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk merged pull request #10556: chore: clean up csv tests

Posted by GitBox <gi...@apache.org>.
bkyryliuk merged pull request #10556:
URL: https://github.com/apache/incubator-superset/pull/10556


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org