ashb commented on issue #3937: [AIRFLOW-3103] Update flask-login.
URL: 
https://github.com/apache/incubator-airflow/pull/3937#issuecomment-426708423
 
 
   You need this too:
   
   ```
   diff --git a/tests/www_rbac/test_security.py 
b/tests/www_rbac/test_security.py
   index 67ea5b30..6e0b5726 100644
   --- a/tests/www_rbac/test_security.py
   +++ b/tests/www_rbac/test_security.py
   @@ -109,7 +109,7 @@ class TestSecurity(unittest.TestCase):
   
        def test_get_user_roles(self):
            user = mock.MagicMock()
   -        user.is_anonymous.return_value = False
   +        user.is_anonymous = False
            roles = self.appbuilder.sm.find_role('Admin')
            user.roles = roles
            self.assertEqual(self.security_manager.get_user_roles(user), roles)
   @@ -144,7 +144,7 @@ class TestSecurity(unittest.TestCase):
            self.security_manager.init_role(role_name, role_vms, role_perms)
            role = self.security_manager.find_role(role_name)
            user.roles = [role]
   -        user.is_anonymous.return_value = False
   +        user.is_anonymous = False
            mock_get_all_permissions_views.return_value = {('can_dag_read', 
'dag_id')}
   
            mock_get_user_roles.return_value = [role]
   @@ -154,7 +154,7 @@ class TestSecurity(unittest.TestCase):
        
@mock.patch('airflow.www_rbac.security.AirflowSecurityManager._has_view_access')
        def test_has_access(self, mock_has_view_access):
            user = mock.MagicMock()
   -        user.is_anonymous.return_value = False
   +        user.is_anonymous = False
            mock_has_view_access.return_value = True
            self.assertTrue(self.security_manager.has_access('perm', 'view', 
user))
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to