(role: str)
| 151 | class ManageRoles: |
| 152 | @staticmethod |
| 153 | def get_role(role: str): |
| 154 | app = create_app(config.APP_NAME + '-cli') |
| 155 | usr = None |
| 156 | with app.test_request_context(): |
| 157 | usr = Role.query.filter_by(name=role).first() |
| 158 | |
| 159 | if not usr: |
| 160 | return None |
| 161 | return usr.id |
| 162 | |
| 163 | |
| 164 | class ManageUsers: |
no test coverage detected