john-bodley commented on code in PR #27149:
URL: https://github.com/apache/superset/pull/27149#discussion_r1496821910


##########
tests/integration_tests/base_tests.py:
##########
@@ -196,7 +196,8 @@ def get_or_create(self, cls, criteria, **kwargs):
         db.session.commit()
         return obj
 
-    def login(self, username="admin", password="general"):
+    def login(self, username, password="general"):
+        self.logout()

Review Comment:
   The whole login/logout logic is convoluted given how our tests are defined. 
Ideally there would be an `auth_user` context manager and an associated 
`pytest` fixture which would be used to authenticate a user. Sadly this isn't 
overly viable with the `pytest`/`unittest` mix we have and so I felt it was 
likely easiest to simply help guarantee  that the the login works was to first 
logout any user (if currently defined).



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to