Skip to content

Workspace user management #10362

Workspace user management

Workspace user management #10362

GitHub Actions / Unit Test Results failed Feb 19, 2025 in 0s

11 fail, 611 pass in 7s

622 tests  ±0   611 ✅  - 11   7s ⏱️ -1s
  1 suites ±0     0 💤 ± 0 
  1 files   ±0    11 ❌ +11 

Results for commit fee832a. ± Comparison against earlier commit 081055c.

Annotations

Check warning on line 0 in tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_workspace_users_returns_users[aad_authentication.AzureADAuthorization] (tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
pydantic.error_wrappers.ValidationError: 7 validation errors for UsersInResponse
users -> 0 -> displayName
  field required (type=value_error.missing)
users -> 0 -> userPrincipalName
  field required (type=value_error.missing)
users -> 0 -> roles -> 0
  value is not a valid dict (type=type_error.dict)
users -> 0 -> roles -> 1
  value is not a valid dict (type=type_error.dict)
users -> 1 -> displayName
  field required (type=value_error.missing)
users -> 1 -> userPrincipalName
  field required (type=value_error.missing)
users -> 1 -> roles -> 0
  value is not a valid dict (type=type_error.dict)
self = <tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin object at 0x7f1d1de1df70>
_ = <AsyncMock name='get_workspace_by_id' id='139762748480384'>
auth_class = 'aad_authentication.AzureADAuthorization'
app = <fastapi.applications.FastAPI object at 0x7f1d0b6b2720>
client = <httpx.AsyncClient object at 0x7f1d0cf9e5a0>

    @pytest.mark.parametrize("auth_class", ["aad_authentication.AzureADAuthorization"])
    @patch("api.dependencies.workspaces.WorkspaceRepository.get_workspace_by_id", return_value=sample_workspace())
    async def test_get_workspace_users_returns_users(self, _, auth_class, app, client):
        with patch(f"services.{auth_class}.get_workspace_users") as get_workspace_users_mock:
    
            users = [
                {
                    "id": "123",
                    "name": "John Doe",
                    "email": "[email protected]",
                    "roles": ["WorkspaceOwner", "WorkspaceResearcher"],
                    'roleAssignments': []
                },
                {
                    "id": "456",
                    "name": "Jane Smith",
                    "email": "[email protected]",
                    "roles": ["WorkspaceResearcher"],
                    'roleAssignments': []
                }
            ]
            get_workspace_users_mock.return_value = users
    
>           response = await client.get(app.url_path_for(strings.API_GET_WORKSPACE_USERS, workspace_id=WORKSPACE_ID))

tests_ma/test_api/test_routes/test_workspace_users.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1757: in get
    return await self.request(
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1530: in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1617: in send
    response = await self._send_handling_auth(
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1645: in _send_handling_auth
    response = await self._send_handling_redirects(
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1682: in _send_handling_redirects
    response = await self._send_single_request(request)
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1719: in _send_single_request
    response = await transport.handle_async_request(request)
/usr/local/lib/python3.12/site-packages/httpx/_transports/asgi.py:162: in handle_async_request
    await self.app(scope, receive, send)
/usr/local/lib/python3.12/site-packages/fastapi/applications.py:1054: in __call__
    await super().__call__(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/applications.py:113: in __call__
    await self.middleware_stack(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:187: in __call__
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:165: in __call__
    await self.app(scope, receive, _send)
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:187: in __call__
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:165: in __call__
    await self.app(scope, receive, _send)
/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py:62: in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:53: in wrapped_app
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:42: in wrapped_app
    await app(scope, receive, sender)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:715: in __call__
    await self.middleware_stack(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:735: in app
    await route.handle(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:288: in handle
    await self.app(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:76: in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:53: in wrapped_app
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:42: in wrapped_app
    await app(scope, receive, sender)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:73: in app
    response = await f(request)
/usr/local/lib/python3.12/site-packages/fastapi/routing.py:301: in app
    raw_response = await run_endpoint_function(
/usr/local/lib/python3.12/site-packages/fastapi/routing.py:212: in run_endpoint_function
    return await dependant.call(**values)
api/routes/workspace_users.py:18: in get_workspace_users
    return UsersInResponse(users=users)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   pydantic.error_wrappers.ValidationError: 7 validation errors for UsersInResponse
E   users -> 0 -> displayName
E     field required (type=value_error.missing)
E   users -> 0 -> userPrincipalName
E     field required (type=value_error.missing)
E   users -> 0 -> roles -> 0
E     value is not a valid dict (type=type_error.dict)
E   users -> 0 -> roles -> 1
E     value is not a valid dict (type=type_error.dict)
E   users -> 1 -> displayName
E     field required (type=value_error.missing)
E   users -> 1 -> userPrincipalName
E     field required (type=value_error.missing)
E   users -> 1 -> roles -> 0
E     value is not a valid dict (type=type_error.dict)

pydantic/main.py:341: ValidationError

Check warning on line 0 in tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_assign_workspace_user_assigns_workspace_user[aad_authentication.AzureADAuthorization] (tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
AttributeError: <class 'services.aad_authentication.AzureADAuthorization'> does not have the attribute 'get_user_by_email'
self = <tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin object at 0x7f1d1de1e3c0>
get_workspace_by_id_mock = <AsyncMock name='get_workspace_by_id' id='139762747416768'>
auth_class = 'aad_authentication.AzureADAuthorization'
app = <fastapi.applications.FastAPI object at 0x7f1d0b6b2720>
client = <httpx.AsyncClient object at 0x7f1d0ce9a870>

    @pytest.mark.parametrize("auth_class", ["aad_authentication.AzureADAuthorization"])
    @patch("api.dependencies.workspaces.WorkspaceRepository.get_workspace_by_id", return_value=sample_workspace())
    async def test_assign_workspace_user_assigns_workspace_user(self, get_workspace_by_id_mock, auth_class, app, client):
>       with patch(f"services.{auth_class}.get_user_by_email") as get_user_by_email_mock, \
                patch(f"services.{auth_class}.get_workspace_role_by_name") as get_workspace_role_by_name_mock, \
                patch(f"services.{auth_class}.assign_workspace_user") as assign_workspace_user_mock, \
                patch(f"services.{auth_class}.get_workspace_users") as get_workspace_users_mock:

tests_ma/test_api/test_routes/test_workspace_users.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/mock/mock.py:1520: in __enter__
    original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mock.mock._patch object at 0x7f1d0cfdc200>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.__dict__[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <class 'services.aad_authentication.AzureADAuthorization'> does not have the attribute 'get_user_by_email'

/usr/local/lib/python3.12/site-packages/mock/mock.py:1493: AttributeError

Check warning on line 0 in tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_remove_workspace_user_assignment_removes_workspace_user_assignment[aad_authentication.AzureADAuthorization] (tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
AttributeError: <class 'services.aad_authentication.AzureADAuthorization'> does not have the attribute 'get_user_by_email'
self = <tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin object at 0x7f1d1de1e870>
get_workspace_by_id_mock = <AsyncMock name='get_workspace_by_id' id='139762743703936'>
auth_class = 'aad_authentication.AzureADAuthorization'
app = <fastapi.applications.FastAPI object at 0x7f1d0b6b2720>
client = <httpx.AsyncClient object at 0x7f1d0cb0f7d0>

    @pytest.mark.parametrize("auth_class", ["aad_authentication.AzureADAuthorization"])
    @patch("api.dependencies.workspaces.WorkspaceRepository.get_workspace_by_id", return_value=sample_workspace())
    async def test_remove_workspace_user_assignment_removes_workspace_user_assignment(self, get_workspace_by_id_mock, auth_class, app, client):
        with patch(f"services.{auth_class}.remove_workspace_role_user_assignment") as remove_workspace_role_user_assignment_mock, \
>               patch(f"services.{auth_class}.get_user_by_email") as get_user_by_email_mock, \
                patch(f"services.{auth_class}.get_workspace_role_by_name") as get_workspace_role_by_name_mock, \
                patch(f"services.{auth_class}.get_workspace_users") as get_workspace_users_mock:

tests_ma/test_api/test_routes/test_workspace_users.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/mock/mock.py:1520: in __enter__
    original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mock.mock._patch object at 0x7f1d0caea0f0>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.__dict__[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <class 'services.aad_authentication.AzureADAuthorization'> does not have the attribute 'get_user_by_email'

/usr/local/lib/python3.12/site-packages/mock/mock.py:1493: AttributeError

Check warning on line 0 in tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_assignable_users_returns_assignable_users[aad_authentication.AzureADAuthorization] (tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
pydantic.error_wrappers.ValidationError: 6 validation errors for AssignableUsersInResponse
assignable_users -> 0 -> id
  field required (type=value_error.missing)
assignable_users -> 0 -> displayName
  field required (type=value_error.missing)
assignable_users -> 0 -> userPrincipalName
  field required (type=value_error.missing)
assignable_users -> 1 -> id
  field required (type=value_error.missing)
assignable_users -> 1 -> displayName
  field required (type=value_error.missing)
assignable_users -> 1 -> userPrincipalName
  field required (type=value_error.missing)
self = <tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin object at 0x7f1d1de1ecf0>
get_workspace_by_id_mock = <AsyncMock name='get_workspace_by_id' id='139762743699568'>
auth_class = 'aad_authentication.AzureADAuthorization'
app = <fastapi.applications.FastAPI object at 0x7f1d0b6b2720>
client = <httpx.AsyncClient object at 0x7f1d0cb0d640>

    @pytest.mark.parametrize("auth_class", ["aad_authentication.AzureADAuthorization"])
    @patch("api.dependencies.workspaces.WorkspaceRepository.get_workspace_by_id", return_value=sample_workspace())
    async def test_get_assignable_users_returns_assignable_users(self, get_workspace_by_id_mock, auth_class, app, client):
        with patch(f"services.{auth_class}.get_assignable_users") as get_assignable_users_mock:
            assignable_users = [
                {
                    "name": "John Doe",
                    "email": "[email protected]",
                },
                {
                    "name": "Jane Smith",
                    "email": "[email protected]",
                }
            ]
    
            get_assignable_users_mock.return_value = assignable_users
    
>           response = await client.get(app.url_path_for(strings.API_GET_ASSIGNABLE_USERS, workspace_id=WORKSPACE_ID))

tests_ma/test_api/test_routes/test_workspace_users.py:179: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1757: in get
    return await self.request(
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1530: in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1617: in send
    response = await self._send_handling_auth(
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1645: in _send_handling_auth
    response = await self._send_handling_redirects(
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1682: in _send_handling_redirects
    response = await self._send_single_request(request)
/usr/local/lib/python3.12/site-packages/httpx/_client.py:1719: in _send_single_request
    response = await transport.handle_async_request(request)
/usr/local/lib/python3.12/site-packages/httpx/_transports/asgi.py:162: in handle_async_request
    await self.app(scope, receive, send)
/usr/local/lib/python3.12/site-packages/fastapi/applications.py:1054: in __call__
    await super().__call__(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/applications.py:113: in __call__
    await self.middleware_stack(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:187: in __call__
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:165: in __call__
    await self.app(scope, receive, _send)
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:187: in __call__
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py:165: in __call__
    await self.app(scope, receive, _send)
/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py:62: in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:53: in wrapped_app
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:42: in wrapped_app
    await app(scope, receive, sender)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:715: in __call__
    await self.middleware_stack(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:735: in app
    await route.handle(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:288: in handle
    await self.app(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:76: in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:53: in wrapped_app
    raise exc
/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py:42: in wrapped_app
    await app(scope, receive, sender)
/usr/local/lib/python3.12/site-packages/starlette/routing.py:73: in app
    response = await f(request)
/usr/local/lib/python3.12/site-packages/fastapi/routing.py:301: in app
    raw_response = await run_endpoint_function(
/usr/local/lib/python3.12/site-packages/fastapi/routing.py:212: in run_endpoint_function
    return await dependant.call(**values)
api/routes/workspace_users.py:24: in get_assignable_users
    return AssignableUsersInResponse(assignable_users=assignable_users)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   pydantic.error_wrappers.ValidationError: 6 validation errors for AssignableUsersInResponse
E   assignable_users -> 0 -> id
E     field required (type=value_error.missing)
E   assignable_users -> 0 -> displayName
E     field required (type=value_error.missing)
E   assignable_users -> 0 -> userPrincipalName
E     field required (type=value_error.missing)
E   assignable_users -> 1 -> id
E     field required (type=value_error.missing)
E   assignable_users -> 1 -> displayName
E     field required (type=value_error.missing)
E   assignable_users -> 1 -> userPrincipalName
E     field required (type=value_error.missing)

pydantic/main.py:341: ValidationError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_workspace_user_emails_by_role_assignment_with_single_user_returns_user_mail_and_role_assignment (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
KeyError: 'displayName'
_ = <MagicMock name='_get_msgraph_token' id='139762714942144'>
users = <MagicMock name='_get_user_details' id='139762714827312'>
roles = <MagicMock name='_get_user_role_assignments' id='139762714836432'>
app_sp_graph_data_mock = <MagicMock name='_get_app_sp_graph_data' id='139762718565984'>
user_response = {'responses': [{'body': {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users(mail,id).../json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"}', 'id': '1', 'status': 200}]}
roles_response = {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals(workspace-client-id)...id1', 'principalType': 'User'}, {'appRoleId': '1abc4', 'principalId': 'group_principal_id', 'principalType': 'Group'}]}
get_app_sp_graph_data_mock = {'value': [{'appRoles': [{'id': '1abc3', 'value': 'WorkspaceResearcher'}, {'id': '1abc4', 'value': 'WorkspaceOwner'}, {'id': '1abc5', 'value': 'AirlockManager'}], 'id': '12345', 'servicePrincipalNames': ['api://tre_ws_1234']}]}

    @patch("services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_role_assignments")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_details")
    @patch(
        "services.aad_authentication.AzureADAuthorization._get_msgraph_token",
        return_value="token",
    )
    def test_get_workspace_user_emails_by_role_assignment_with_single_user_returns_user_mail_and_role_assignment(
        _, users, roles, app_sp_graph_data_mock, user_response, roles_response, get_app_sp_graph_data_mock
    ):
        access_service = AzureADAuthorization()
    
        # Use fixtures
        users.return_value = user_response
        roles.return_value = roles_response
        app_sp_graph_data_mock.return_value = get_app_sp_graph_data_mock
    
        # Act
>       role_assignment_details = access_service.get_workspace_user_emails_by_role_assignment(
            Workspace(
                id="id",
                templateName="tre-workspace-base",
                templateVersion="0.1.0",
                etag="",
                properties={
                    "sp_id": "ab123",
                    "client_id": "ab124",
                    "app_role_id_workspace_owner": "1abc4",
                    "app_role_id_workspace_researcher": "ab125",
                    "app_role_id_workspace_airlock_manager": "ab130",
                },
            )
        )

tests_ma/test_services/test_aad_access_service.py:432: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
services/aad_authentication.py:354: in get_workspace_user_emails_by_role_assignment
    users = self.get_workspace_users(workspace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <services.aad_authentication.AzureADAuthorization object at 0x7f1d0afa0050>
workspace = Workspace(id='id', templateName='tre-workspace-base', templateVersion='0.1.0', properties={'sp_id': 'ab123', 'client_i...rkspace'>, deploymentStatus=None, etag='', resourcePath='', resourceVersion=0, user={}, updatedWhen=0, workspaceURL='')

    def get_workspace_users(self, workspace: Workspace) -> List[AssignedUser]:
        msgraph_token = self._get_msgraph_token()
    
        sp_graph_data = self._get_app_sp_graph_data(workspace.properties["client_id"])
>       app_id_to_role_name = {app_role["id"]: (app_role["displayName"]) for app_role in sp_graph_data["value"][0]["appRoles"]}
E       KeyError: 'displayName'

services/aad_authentication.py:315: KeyError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_workspace_user_emails_by_role_assignment_with_single_user_with_no_mail_is_not_returned (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
KeyError: 'displayName'
_ = <MagicMock name='_get_msgraph_token' id='139762715009936'>
users = <MagicMock name='_get_user_details' id='139762718639264'>
roles = <MagicMock name='_get_user_role_assignments' id='139762718639696'>
app_sp_graph_data_mock = <MagicMock name='_get_app_sp_graph_data' id='139762718641424'>
user_response = {'responses': [{'body': {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users(mail,id).../json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"}', 'id': '1', 'status': 200}]}
roles_response = {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals(workspace-client-id)...id1', 'principalType': 'User'}, {'appRoleId': '1abc4', 'principalId': 'group_principal_id', 'principalType': 'Group'}]}
get_app_sp_graph_data_mock = {'value': [{'appRoles': [{'id': '1abc3', 'value': 'WorkspaceResearcher'}, {'id': '1abc4', 'value': 'WorkspaceOwner'}, {'id': '1abc5', 'value': 'AirlockManager'}], 'id': '12345', 'servicePrincipalNames': ['api://tre_ws_1234']}]}

    @patch("services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_role_assignments")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_details")
    @patch(
        "services.aad_authentication.AzureADAuthorization._get_msgraph_token",
        return_value="token",
    )
    def test_get_workspace_user_emails_by_role_assignment_with_single_user_with_no_mail_is_not_returned(
        _, users, roles, app_sp_graph_data_mock, user_response, roles_response, get_app_sp_graph_data_mock
    ):
        access_service = AzureADAuthorization()
    
        # Build user response
        user_response_no_mail = user_response.copy()
        user_response_no_mail["responses"][0]["body"]["userPrincipalName"] = None
        users.return_value = user_response_no_mail
    
        roles.return_value = roles_response
        app_sp_graph_data_mock.return_value = get_app_sp_graph_data_mock
    
        # Act
>       role_assignment_details = access_service.get_workspace_user_emails_by_role_assignment(
            Workspace(
                id="id",
                templateName="tre-workspace-base",
                templateVersion="0.1.0",
                etag="",
                properties={
                    "sp_id": "ab123",
                    "client_id": "ab124",
                    "app_role_id_workspace_owner": "1abc4",
                    "app_role_id_workspace_researcher": "ab125",
                    "app_role_id_workspace_airlock_manager": "ab130",
                },
            )
        )

tests_ma/test_services/test_aad_access_service.py:472: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
services/aad_authentication.py:354: in get_workspace_user_emails_by_role_assignment
    users = self.get_workspace_users(workspace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <services.aad_authentication.AzureADAuthorization object at 0x7f1d0afb2ae0>
workspace = Workspace(id='id', templateName='tre-workspace-base', templateVersion='0.1.0', properties={'sp_id': 'ab123', 'client_i...rkspace'>, deploymentStatus=None, etag='', resourcePath='', resourceVersion=0, user={}, updatedWhen=0, workspaceURL='')

    def get_workspace_users(self, workspace: Workspace) -> List[AssignedUser]:
        msgraph_token = self._get_msgraph_token()
    
        sp_graph_data = self._get_app_sp_graph_data(workspace.properties["client_id"])
>       app_id_to_role_name = {app_role["id"]: (app_role["displayName"]) for app_role in sp_graph_data["value"][0]["appRoles"]}
E       KeyError: 'displayName'

services/aad_authentication.py:315: KeyError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_workspace_user_emails_by_role_assignment_with_only_groups_assigned_returns_group_members (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
KeyError: 'displayName'
_ = <MagicMock name='_get_msgraph_token' id='139762718594528'>
users_and_groups = <MagicMock name='_get_user_details' id='139762718936336'>
roles = <MagicMock name='_get_user_role_assignments' id='139762718938448'>
app_sp_graph_data_mock = <MagicMock name='_get_app_sp_graph_data' id='139762718942624'>
group_response = {'responses': [{'body': {'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#directoryObjects(mail,id)', 'va...e;IEEE754Compatible=false;charset=utf-8"}', 'id': 'group_principal_id', 'request': {'id': 'group_principal_id'}, ...}]}
roles_response = {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals(workspace-client-id)...id1', 'principalType': 'User'}, {'appRoleId': '1abc4', 'principalId': 'group_principal_id', 'principalType': 'Group'}]}
get_app_sp_graph_data_mock = {'value': [{'appRoles': [{'id': '1abc3', 'value': 'WorkspaceResearcher'}, {'id': '1abc4', 'value': 'WorkspaceOwner'}, {'id': '1abc5', 'value': 'AirlockManager'}], 'id': '12345', 'servicePrincipalNames': ['api://tre_ws_1234']}]}

    @patch("services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_role_assignments")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_details")
    @patch(
        "services.aad_authentication.AzureADAuthorization._get_msgraph_token",
        return_value="token",
    )
    def test_get_workspace_user_emails_by_role_assignment_with_only_groups_assigned_returns_group_members(
        _, users_and_groups, roles, app_sp_graph_data_mock, group_response, roles_response, get_app_sp_graph_data_mock
    ):
        access_service = AzureADAuthorization()
    
        users_and_groups.return_value = group_response
        roles.return_value = roles_response
        app_sp_graph_data_mock.return_value = get_app_sp_graph_data_mock
    
        # Act
>       role_assignment_details = access_service.get_workspace_user_emails_by_role_assignment(
            Workspace(
                id="id",
                templateName="tre-workspace-base",
                templateVersion="0.1.0",
                etag="",
                properties={
                    "sp_id": "ab123",
                    "client_id": "ab124",
                    "app_role_id_workspace_owner": "1abc4",
                    "app_role_id_workspace_researcher": "ab125",
                    "app_role_id_workspace_airlock_manager": "ab130",
                },
            )
        )

tests_ma/test_services/test_aad_access_service.py:508: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
services/aad_authentication.py:354: in get_workspace_user_emails_by_role_assignment
    users = self.get_workspace_users(workspace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <services.aad_authentication.AzureADAuthorization object at 0x7f1d0b31c440>
workspace = Workspace(id='id', templateName='tre-workspace-base', templateVersion='0.1.0', properties={'sp_id': 'ab123', 'client_i...rkspace'>, deploymentStatus=None, etag='', resourcePath='', resourceVersion=0, user={}, updatedWhen=0, workspaceURL='')

    def get_workspace_users(self, workspace: Workspace) -> List[AssignedUser]:
        msgraph_token = self._get_msgraph_token()
    
        sp_graph_data = self._get_app_sp_graph_data(workspace.properties["client_id"])
>       app_id_to_role_name = {app_role["id"]: (app_role["displayName"]) for app_role in sp_graph_data["value"][0]["appRoles"]}
E       KeyError: 'displayName'

services/aad_authentication.py:315: KeyError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_workspace_user_emails_by_role_assignment_with_groups_and_users_assigned_returned_as_expected (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
KeyError: 'displayName'
_ = <MagicMock name='_get_msgraph_token' id='139762718613264'>
users_and_groups = <MagicMock name='_get_user_details' id='139762714844512'>
roles = <MagicMock name='_get_user_role_assignments' id='139762719230144'>
app_sp_graph_data_mock = <MagicMock name='_get_app_sp_graph_data' id='139762718936240'>
roles_response = {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#servicePrincipals(workspace-client-id)...id1', 'principalType': 'User'}, {'appRoleId': '1abc4', 'principalId': 'group_principal_id', 'principalType': 'Group'}]}
get_app_sp_graph_data_mock = {'value': [{'appRoles': [{'id': '1abc3', 'value': 'WorkspaceResearcher'}, {'id': '1abc4', 'value': 'WorkspaceOwner'}, {'id': '1abc5', 'value': 'AirlockManager'}], 'id': '12345', 'servicePrincipalNames': ['api://tre_ws_1234']}]}
users_and_group_response = {'responses': [{'body': {'@odata.context': '@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users(mail,id)...e;IEEE754Compatible=false;charset=utf-8"}', 'id': 'group_principal_id', 'request': {'id': 'group_principal_id'}, ...}]}

    @patch("services.aad_authentication.AzureADAuthorization._get_app_sp_graph_data")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_role_assignments")
    @patch("services.aad_authentication.AzureADAuthorization._get_user_details")
    @patch(
        "services.aad_authentication.AzureADAuthorization._get_msgraph_token",
        return_value="token",
    )
    def test_get_workspace_user_emails_by_role_assignment_with_groups_and_users_assigned_returned_as_expected(
        _, users_and_groups, roles, app_sp_graph_data_mock, roles_response, get_app_sp_graph_data_mock, users_and_group_response
    ):
    
        access_service = AzureADAuthorization()
    
        roles.return_value = roles_response
        app_sp_graph_data_mock.return_value = get_app_sp_graph_data_mock
        users_and_groups.return_value = users_and_group_response
    
        # Act
>       role_assignment_details = access_service.get_workspace_user_emails_by_role_assignment(
            Workspace(
                id="id",
                templateName="tre-workspace-base",
                templateVersion="0.1.0",
                etag="",
                properties={
                    "sp_id": "ab123",
                    "client_id": "ab123",
                    "app_role_id_workspace_owner": "ab124",
                    "app_role_id_workspace_researcher": "ab125",
                    "app_role_id_workspace_airlock_manager": "ab130",
                },
            )
        )

tests_ma/test_services/test_aad_access_service.py:547: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
services/aad_authentication.py:354: in get_workspace_user_emails_by_role_assignment
    users = self.get_workspace_users(workspace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <services.aad_authentication.AzureADAuthorization object at 0x7f1d0b371af0>
workspace = Workspace(id='id', templateName='tre-workspace-base', templateVersion='0.1.0', properties={'sp_id': 'ab123', 'client_i...rkspace'>, deploymentStatus=None, etag='', resourcePath='', resourceVersion=0, user={}, updatedWhen=0, workspaceURL='')

    def get_workspace_users(self, workspace: Workspace) -> List[AssignedUser]:
        msgraph_token = self._get_msgraph_token()
    
        sp_graph_data = self._get_app_sp_graph_data(workspace.properties["client_id"])
>       app_id_to_role_name = {app_role["id"]: (app_role["displayName"]) for app_role in sp_graph_data["value"][0]["appRoles"]}
E       KeyError: 'displayName'

services/aad_authentication.py:315: KeyError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_user_by_email (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
AttributeError: <class 'services.aad_authentication.AzureADAuthorization'> does not have the attribute 'get_user_by_email'
args = (), keywargs = {}

    @wraps(func)
    def patched(*args, **keywargs):
>       with self.decoration_helper(patched,
                                    args,
                                    keywargs) as (newargs, newkeywargs):

/usr/local/lib/python3.12/site-packages/mock/mock.py:1449: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
/usr/local/lib/python3.12/site-packages/mock/mock.py:1431: in decoration_helper
    arg = exit_stack.enter_context(patching)
/usr/local/lib/python3.12/contextlib.py:526: in enter_context
    result = _enter(cm)
/usr/local/lib/python3.12/site-packages/mock/mock.py:1520: in __enter__
    original, local = self.get_original()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <mock.mock._patch object at 0x7f1d1e27a870>

    def get_original(self):
        target = self.getter()
        name = self.attribute
    
        original = DEFAULT
        local = False
    
        try:
            original = target.__dict__[name]
        except (AttributeError, KeyError):
            original = getattr(target, name, DEFAULT)
        else:
            local = True
    
        if name in _builtins and isinstance(target, ModuleType):
            self.create = True
    
        if not self.create and original is DEFAULT:
>           raise AttributeError(
                "%s does not have the attribute %r" % (target, name)
            )
E           AttributeError: <class 'services.aad_authentication.AzureADAuthorization'> does not have the attribute 'get_user_by_email'

/usr/local/lib/python3.12/site-packages/mock/mock.py:1493: AttributeError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_remove_workspace_user_if_groups (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
AssertionError: assert 0 == 1
 +  where 0 = <MagicMock name='_remove_workspace_user_from_application_group' id='139762715768400'>.call_count
get_role_assignment_mock = <MagicMock name='_get_role_assignment_for_user' id='139762715710128'>
remove_user_to_role_mock = <MagicMock name='_remove_workspace_user_from_application' id='139762715710320'>
remove_user_to_group_mock = <MagicMock name='_remove_workspace_user_from_application_group' id='139762715768400'>
workspace_without_groups = <MagicMock name='_is_workspace_role_group_in_use' id='139762716119584'>
role_owner = Role(id='owner-role-id', value='WorkspaceOwner', isEnabled=True, email=None, allowedMemberTypes=[], description='Owner', displayName='Owner', origin='', roleAssignments=[])
user_with_role = User(id='user2', name='Test User 2', email='[email protected]', roles=['WorkspaceOwner'], roleAssignments=[])

    @patch("services.aad_authentication.AzureADAuthorization._is_workspace_role_group_in_use", return_value=True)
    @patch("services.aad_authentication.AzureADAuthorization._remove_workspace_user_from_application_group")
    @patch("services.aad_authentication.AzureADAuthorization._remove_workspace_user_from_application")
    @patch("services.aad_authentication.AzureADAuthorization._get_role_assignment_for_user")
    def test_remove_workspace_user_if_groups(get_role_assignment_mock,
                                             remove_user_to_role_mock, remove_user_to_group_mock,
                                             workspace_without_groups, role_owner,
                                             user_with_role):
    
        access_service = AzureADAuthorization()
        remove_user_to_role_mock.return_value = None
        get_role_assignment_mock.return_value = []
    
        access_service.remove_workspace_role_user_assignment(user_with_role, workspace_without_groups, role_owner)
    
>       assert remove_user_to_group_mock.call_count == 1
E       AssertionError: assert 0 == 1
E        +  where 0 = <MagicMock name='_remove_workspace_user_from_application_group' id='139762715768400'>.call_count

tests_ma/test_services/test_aad_access_service.py:832: AssertionError

Check warning on line 0 in tests_ma.test_services.test_aad_access_service

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

test_get_assignable_users_returns_users (tests_ma.test_services.test_aad_access_service) failed

artifacts/test-results/pytest_api_unit.xml [took 0s]
Raw output
KeyError: 'id'
_ = <MagicMock name='_get_auth_header' id='139762716117376'>
request_get_mock = <MagicMock name='get' id='139762715562144'>
mock_headers = <MagicMock name='_get_msgraph_token' id='139762714942192'>

    @patch("services.aad_authentication.AzureADAuthorization._get_msgraph_token", return_value="token")
    @patch("requests.get")
    @patch("services.aad_authentication.AzureADAuthorization._get_auth_header")
    def test_get_assignable_users_returns_users(_, request_get_mock, mock_headers):
        access_service = AzureADAuthorization()
    
        # mock the response of _get_auth_header
        headers = {"Authorization": "Bearer token"}
        mock_headers.return_value = headers
        headers["Content-type"] = "application/json"
    
        # Mock the response of the get request
        request_get_mock_response = {
            "value": [
                {
                    "displayName": "User 1",
                    "userPrincipalName": "[email protected]"
                }
            ]
        }
        request_get_mock.return_value.json.return_value = request_get_mock_response
>       users = access_service.get_assignable_users()

tests_ma/test_services/test_aad_access_service.py:857: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <services.aad_authentication.AzureADAuthorization object at 0x7f1d0b0be7b0>
filter = '', maxResultCount = 5

    def get_assignable_users(self, filter: str = "", maxResultCount: int = 5) -> List[AssignableUser]:
        msgraph_token = self._get_msgraph_token()
        users_endpoint = f"{MICROSOFT_GRAPH_URL}/v1.0/users?$filter=startswith(displayName,'{filter}')&$top={maxResultCount}"
    
        graph_data = requests.get(users_endpoint,
                                  headers=self._get_auth_header(msgraph_token)).json()
        result = []
    
        for user_data in graph_data["value"]:
            result.append(
>               AssignableUser(id=user_data["id"], displayName=user_data["displayName"], userPrincipalName=user_data["userPrincipalName"])
            )
E           KeyError: 'id'

services/aad_authentication.py:332: KeyError

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

622 tests found (test 1 to 388)

There are 622 tests, see "Raw output" for the list of tests 1 to 388.
Raw output
tests_ma.test_api.dependencies.test_database ‑ test_get_container_proxy
tests_ma.test_api.test_errors.test_422_error ‑ test_frw_validation_error_format
tests_ma.test_api.test_errors.test_error ‑ test_frw_validation_error_format
tests_ma.test_api.test_helpers ‑ test_get_repository_raises_http_exception_when_unable_to_access_database
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesPermissions ‑ test_get_airlock_container_link_is_accessible_to_every_role_that_can_create_request[WorkspaceOwner]
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesPermissions ‑ test_get_airlock_container_link_is_accessible_to_every_role_that_can_create_request[WorkspaceResearcher]
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_airlock_review_approves_airlock_request_returns_200
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_airlock_review_cleans_up_review_user_resources
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_airlock_review_input_is_malformed_returns_400
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_airlock_review_with_event_grid_not_responding_returns_503
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_airlock_review_with_illegal_status_change_returns_400
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_review_user_resource_returns_200
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_review_user_resource_returns_400_if_request_is_not_in_review
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_review_user_resource_returns_422_if_cannot_find_workspace_service
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_review_user_resource_returns_422_if_configuration_invalid
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_review_user_resource_with_existing_healthy_resource_returns_409
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireAirlockManagerRights ‑ test_post_create_review_user_resource_with_existing_unhealthy_resource_deletes_previous_and_redeploys
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_container_link_cancelled_request_returns_400
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_container_link_in_progress_request_returns_400
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_container_link_no_airlock_request_found_returns_404
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_container_link_no_workspace_request_found_returns_404
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_container_link_returned_as_expected
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_request_no_airlock_request_found_returns_404
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_request_returns_200
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_airlock_request_state_store_endpoint_not_responding_returns_503
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_get_all_airlock_requests_by_workspace_returns_200
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_creates_airlock_request_returns_201
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_input_is_malformed_returns_400
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_with_airlock_disabled_returns_405
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_with_enable_airlock_property_missing_returns_201
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_with_event_grid_not_responding_returns_503
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_with_non_deployed_workspace_id_returns_404
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_airlock_request_with_state_store_endpoint_not_responding_returns_503
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_cancel_airlock_request_cancels_request_returns_200
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_cancel_airlock_request_if_request_not_found_returns_404
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_submit_airlock_request_if_request_not_found_returns_404
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_submit_airlock_request_submits_airlock_request_returns_200
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_submit_airlock_request_with_event_grid_not_responding_returns_503
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_submit_airlock_request_with_illegal_status_change_returns_400
tests_ma.test_api.test_routes.test_airlock.TestAirlockRoutesThatRequireOwnerOrResearcherRights ‑ test_post_submit_airlock_request_with_state_store_endpoint_not_responding_returns_503
tests_ma.test_api.test_routes.test_api_access.TestTemplateRoutesThatRequireAdminRights ‑ test_post_user_resource_templates_requires_admin_rights
tests_ma.test_api.test_routes.test_api_access.TestTemplateRoutesThatRequireAdminRights ‑ test_post_workspace_service_templates_requires_admin_rights
tests_ma.test_api.test_routes.test_api_access.TestTemplateRoutesThatRequireAdminRights ‑ test_post_workspace_templates_requires_admin_rights
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesOwnerOrResearcherRoutesAccess ‑ test_delete_user_resource_raises_403_if_user_is_not_workspace_owner_or_researcher
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesOwnerOrResearcherRoutesAccess ‑ test_get_user_resource_raises_403_if_user_is_not_workspace_owner_or_researcher
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesOwnerOrResearcherRoutesAccess ‑ test_get_user_resources_raises_403_if_user_is_not_researcher_or_owner_of_workspace
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesOwnerOrResearcherRoutesAccess ‑ test_patch_user_resource_raises_403_if_user_is_not_workspace_owner_or_researcher
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesOwnerOrResearcherRoutesAccess ‑ test_post_user_resource_raises_403_if_user_is_not_workspace_owner_or_researcher
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesRoutesOwnerOrResourceOwnerAccess ‑ test_delete_user_resource_raises_403_if_user_is_researcher_and_not_owner_of_resource
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesRoutesOwnerOrResourceOwnerAccess ‑ test_get_user_resource_raises_403_if_user_is_researcher_and_not_owner_of_resource
tests_ma.test_api.test_routes.test_api_access.TestUserResourcesRoutesOwnerOrResourceOwnerAccess ‑ test_patch_user_resource_raises_403_if_user_is_researcher_and_not_owner_of_resource
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceRoutesThatRequireAdminRights ‑ test_delete_workspace_requires_admin_rights
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspace_requires_admin_rights
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceRoutesThatRequireAdminRights ‑ test_post_workspace_requires_admin_rights
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceServiceOwnerOrResearcherRoutesAccess ‑ test_get_workspace_service_raises_403_if_user_is_not_owner_or_researcher_in_workspace
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceServiceOwnerOrResearcherRoutesAccess ‑ test_get_workspace_services_raises_403_if_user_is_not_owner_or_researcher_of_workspace
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceServiceOwnerOrResearcherRoutesAccess ‑ test_patch_workspaces_service_raises_403_if_user_is_not_workspace_owner
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceServiceOwnerRoutesAccess ‑ test_delete_workspace_service_raises_403_if_user_is_not_workspace_owner
tests_ma.test_api.test_routes.test_api_access.TestWorkspaceServiceOwnerRoutesAccess ‑ test_post_workspace_service_raises_403_if_user_is_not_owner
tests_ma.test_api.test_routes.test_health ‑ test_health_response_contains_cosmos_status
tests_ma.test_api.test_routes.test_health ‑ test_health_response_contains_resource_processor_status
tests_ma.test_api.test_routes.test_health ‑ test_health_response_contains_service_bus_status
tests_ma.test_api.test_routes.test_migrations.TestMigrationRoutesThatRequireAdminRights ‑ test_post_migrations_returns_202_on_successful
tests_ma.test_api.test_routes.test_migrations.TestMigrationRoutesThatRequireAdminRights ‑ test_post_migrations_returns_400_if_template_does_not_exist
tests_ma.test_api.test_routes.test_migrations.TestMigrationRoutesWithNonAdminRights ‑ test_post_migrations_throws_unauthenticated_when_not_admin
tests_ma.test_api.test_routes.test_requests.TestRequestsThatDontRequireAdminRigths ‑ test_get_airlock_manager_requests_returns_200
tests_ma.test_api.test_routes.test_requests.TestRequestsThatDontRequireAdminRigths ‑ test_get_airlock_manager_requests_returns_500
tests_ma.test_api.test_routes.test_requests.TestRequestsThatDontRequireAdminRigths ‑ test_get_all_requests_returns_200
tests_ma.test_api.test_routes.test_requests.TestRequestsThatDontRequireAdminRigths ‑ test_get_all_requests_returns_500
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_enrich_resource_with_available_upgrades_when_there_are_new_upgrades_returns_relevant_upgrades_only
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_enrich_resource_with_available_upgrades_when_there_are_no_upgrades_returns_empty_list
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_save_and_deploy_masks_secrets
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_save_and_deploy_resource_deletes_item_from_db_if_send_request_fails
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_save_and_deploy_resource_raises_503_if_save_to_db_fails
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_save_and_deploy_resource_raises_503_if_send_request_fails
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_save_and_deploy_resource_saves_item
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_save_and_deploy_resource_sends_resource_request_message
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_send_uninstall_message_raises_503_on_service_bus_exception
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_send_uninstall_message_sends_uninstall_message
tests_ma.test_api.test_routes.test_resource_helpers.TestResourceHelpers ‑ test_sensitive_properties_get_masked
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_creating_a_shared_service_template_raises_http_422_if_step_ids_are_duplicated
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_get_shared_service_template_by_name_returns_enriched_template
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_get_shared_service_template_by_name_returns_not_found_if_does_not_exist[EntityDoesNotExist-404]
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_get_shared_service_template_by_name_returns_not_found_if_does_not_exist[UnableToAccessDatabase-503]
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_get_shared_service_templates_returns_template_names_and_description
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_version_exists_not_allowed
tests_ma.test_api.test_routes.test_shared_service_templates.TestSharedServiceTemplates ‑ test_when_creating_service_template_sets_additional_properties
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatDontRequireAdminRigths ‑ test_get_shared_service_returns_shared_service_result_for_user
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatDontRequireAdminRigths ‑ test_get_shared_services_returns_list_of_shared_services_for_user
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_get_shared_service_history_returns_empty_list_when_no_history
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_get_shared_service_history_returns_shared_service_history_result
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_get_shared_service_raises_404_if_not_found
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_get_shared_service_returns_shared_service_result
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_get_shared_services_returns_list_of_shared_services_for_admin_user
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_patches_shared_service
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_returns_404_if_does_not_exist
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_returns_409_if_bad_etag
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_returns_422_if_invalid_id
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_with_downgrade_version_returns_bad_request
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_with_invalid_field_returns_422
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_with_upgrade_major_version_and_force_update_patches_shared_service
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_with_upgrade_major_version_returns_bad_request
tests_ma.test_api.test_routes.test_shared_services.TestSharedServiceRoutesThatRequireAdminRights ‑ test_patch_shared_service_with_upgrade_minor_version_patches_shared_service
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesNotRequiringAdminRights ‑ test_get_user_resource_templates_by_name_returns_returns_error_status_based_on_exception[DuplicateEntity-500]
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesNotRequiringAdminRights ‑ test_get_user_resource_templates_by_name_returns_returns_error_status_based_on_exception[EntityDoesNotExist-404]
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesNotRequiringAdminRights ‑ test_get_user_resource_templates_by_name_returns_returns_error_status_based_on_exception[UnableToAccessDatabase-503]
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesNotRequiringAdminRights ‑ test_get_user_resource_templates_returns_template_names_and_description
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesNotRequiringAdminRights ‑ test_user_resource_templates_by_name_returns_enriched_user_resource_template
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesRequiringAdminRights ‑ test_creating_a_user_resource_template_raises_http_422_if_step_ids_are_duplicated
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesRequiringAdminRights ‑ test_creating_user_resource_template_raises_404_if_service_template_does_not_exist
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesRequiringAdminRights ‑ test_when_creating_user_resource_template_enriched_service_template_is_returned
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesRequiringAdminRights ‑ test_when_creating_user_resource_template_it_is_returned_as_expected
tests_ma.test_api.test_routes.test_user_resource_templates.TestUserResourceTemplatesRequiringAdminRights ‑ test_when_creating_user_resource_template_returns_409_if_version_exists
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_creating_a_template_raises_409_conflict_if_template_version_exists
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_creating_a_workspace_service_template_raises_http_422_if_step_ids_are_duplicated
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_get_workspace_service_templates_returns_template_names_and_description
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_when_creating_service_template_enriched_service_template_is_returned
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_when_creating_workspace_service_template_service_resource_type_is_set
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_when_updating_current_and_service_template_found_update_and_add
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_when_updating_current_and_service_template_not_found_create_one
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_workspace_service_templates_by_name_returns_enriched_workspace_service_template
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_workspace_service_templates_by_name_returns_error_status_based_on_exception[EntityDoesNotExist-404]
tests_ma.test_api.test_routes.test_workspace_service_templates.TestWorkspaceServiceTemplatesRequiringAdminRights ‑ test_workspace_service_templates_by_name_returns_error_status_based_on_exception[UnableToAccessDatabase-503]
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_creating_a_workspace_template_raises_http_422_if_step_ids_are_duplicated
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_post_does_not_create_a_template_with_bad_payload
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_same_name_and_version_template_not_allowed
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_creating_template_enriched_template_is_returned
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_creating_workspace_service_template_custom_actions_is_not_set
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_creating_workspace_service_template_custom_actions_is_set
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_creating_workspace_service_template_service_resource_type_is_set
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_creating_workspace_template_workspace_resource_type_is_set
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_not_updating_current_and_new_registration_current_is_enforced
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_updating_current_and_template_found_update_and_add
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_when_updating_current_and_template_not_found_create_one
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_workspace_templates_by_name_returns_enriched_workspace_template
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_workspace_templates_by_name_returns_returns_error_status_based_on_exception[DuplicateEntity-500]
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_workspace_templates_by_name_returns_returns_error_status_based_on_exception[EntityDoesNotExist-404]
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_workspace_templates_by_name_returns_returns_error_status_based_on_exception[UnableToAccessDatabase-503]
tests_ma.test_api.test_routes.test_workspace_templates.TestWorkspaceTemplate ‑ test_workspace_templates_returns_template_names_and_descriptions
tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin ‑ test_assign_workspace_user_assigns_workspace_user[aad_authentication.AzureADAuthorization]
tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin ‑ test_get_assignable_users_returns_assignable_users[aad_authentication.AzureADAuthorization]
tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin ‑ test_get_workspace_roles_returns_workspace_roles[aad_authentication.AzureADAuthorization]
tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin ‑ test_get_workspace_users_returns_users[aad_authentication.AzureADAuthorization]
tests_ma.test_api.test_routes.test_workspace_users.TestWorkspaceUserRoutesWithTreAdmin ‑ test_remove_workspace_user_assignment_removes_workspace_user_assignment[aad_authentication.AzureADAuthorization]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspace_by_id_get_as_tre_user_returns_403
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspace_by_id_get_returns_404_if_resource_is_not_found
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspaces_returns_correct_data_when_resources_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspaces_returns_empty_list_when_no_resources_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspaces_scope_id_returns_404_if_no_workspace_found
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspaces_scope_id_returns_empty_if_no_scope_id
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatDontRequireAdminRights ‑ test_get_workspaces_scope_id_returns_no_other_properties
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_delete_workspace_raises_503_if_marking_the_resource_as_deleted_in_the_db_fails
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_delete_workspace_returns_400_if_associated_workspace_services_are_not_deleted
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_delete_workspace_returns_400_if_workspace_is_enabled
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_delete_workspace_sends_a_request_message_to_uninstall_the_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_get_workspace_by_id_as_tre_admin
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_get_workspace_by_id_get_returns_422_if_workspace_id_is_not_a_uuid
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_get_workspace_history_returns_empty_list_when_no_history
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_get_workspace_history_returns_workspace_history_result
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_get_workspaces_returns_correct_data_when_resources_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspace_returns_409_if_bad_etag
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_422_when_etag_not_present
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_patches_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_returns_404_if_workspace_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_with_downgrade_version_returns_bad_request
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_with_upgrade_major_version_and_force_update_returns_patched_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_with_upgrade_major_version_returns_bad_request
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_patch_workspaces_with_upgrade_minor_version_patches_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_post_workspaces_calls_db_and_service_bus
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_post_workspaces_creates_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_post_workspaces_returns_202_on_successful_create
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_post_workspaces_returns_400_if_template_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceRoutesThatRequireAdminRights ‑ test_post_workspaces_returns_503_if_service_bus_call_fails
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_delete_user_resource_raises_400_if_user_resource_is_enabled
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_delete_user_resource_returns_resource_id
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_delete_user_resource_sends_uninstall_message
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_user_resource_raises_404_if_resource_not_found
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_user_resource_templates_returns_templates
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_user_resources_returns_own_user_resources_for_researcher
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_workspace_by_id_get_as_workspace_researcher
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_workspace_service_raises_404_if_associated_workspace_is_not_found
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_workspace_service_raises_404_if_workspace_service_is_not_found
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_workspace_service_returns_workspace_service_result
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_workspace_service_templates_returns_templates
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_get_workspace_services_returns_workspace_services_for_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resource_returns_404_if_user_resource_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resource_returns_404_if_ws_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resource_returns_409_if_bad_etag
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resource_returns_422_if_invalid_id[933ad738-7265-4b5f-9eae-a1a62928772e-IAmNotEvenAGUID!-a33ad738-7265-4b5f-9eae-a1a62928772a]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resource_returns_422_if_invalid_id[933ad738-7265-4b5f-9eae-a1a62928772e-abcad738-7265-4b5f-9eae-a1a62928772e-IAmNotEvenAGUID]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resource_returns_422_if_invalid_id[IAmNotEvenAGUID!-abcad738-7265-4b5f-9eae-a1a62928772e-a33ad738-7265-4b5f-9eae-a1a62928772a]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_patch_user_resources_patches_user_resource
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_post_user_resources_creates_user_resource
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_post_user_resources_raises_400_bad_request_if_input_is_bad
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_post_user_resources_with_non_deployed_service_id_returns_404
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_post_user_resources_with_non_deployed_workspace_id_returns_404
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_post_user_resources_with_non_existing_service_id_returns_404
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerOrResearcherRights ‑ test_post_user_resources_with_non_existing_workspace_id_returns_404
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_delete_workspace_service_raises_400_if_workspace_service_is_enabled
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_delete_workspace_service_raises_404_if_workspace_service_has_active_resources
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_delete_workspace_service_returns_the_deleted_workspace_service_id
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_delete_workspace_service_sends_uninstall_message
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_get_user_resource_history_returns_empty_list_when_no_history
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_get_user_resource_history_returns_user_resource_history_result
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_get_user_resource_returns_a_user_resource_if_found
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_get_user_resources_returns_all_user_resources_for_workspace_service_if_owner
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_get_workspace_service_history_returns_empty_list_when_no_history
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_get_workspace_service_history_returns_workspace_service_history_result
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_400_when_invalid
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_patches_user_resource
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_returns_404_if_user_resource_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_returns_404_if_ws_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_returns_422_if_invalid_id[933ad738-7265-4b5f-9eae-a1a62928772e-IAmNotEvenAGUID!-a33ad738-7265-4b5f-9eae-a1a62928772a]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_returns_422_if_invalid_id[933ad738-7265-4b5f-9eae-a1a62928772e-abcad738-7265-4b5f-9eae-a1a62928772e-IAmNotEvenAGUID]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_returns_422_if_invalid_id[IAmNotEvenAGUID!-abcad738-7265-4b5f-9eae-a1a62928772e-a33ad738-7265-4b5f-9eae-a1a62928772a]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_validates_against_template
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_with_downgrade_version_returns_bad_request
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_with_upgrade_major_version_and_force_update_returns_patched_user_resource
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_with_upgrade_major_version_returns_bad_request
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_user_resource_with_upgrade_minor_version_patches_user_resource
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_patches_workspace_service
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_returns_404_if_workspace_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_returns_404_if_workspace_service_does_not_exist
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_returns_409_if_bad_etag
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_returns_422_if_invalid_id[933ad738-7265-4b5f-9eae-a1a62928772e-IAmNotEvenAGUID!]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_returns_422_if_invalid_id[IAmNotEvenAGUID!-933ad738-7265-4b5f-9eae-a1a62928772e]
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_with_downgrade_version_returns_bad_request
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_with_upgrade_major_version_and_force_update_returns_patched_workspace_service
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_with_upgrade_major_version_returns_bad_request
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_patch_workspace_service_with_upgrade_minor_version_patches_workspace
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_post_workspace_services_creates_workspace_service
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_post_workspace_services_creates_workspace_service_with_address_space
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_post_workspace_services_creates_workspace_service_with_address_space_workspace_has_no_address_spaces_property
tests_ma.test_api.test_routes.test_workspaces.TestWorkspaceServiceRoutesThatRequireOwnerRights ‑ test_post_workspace_services_raises_400_bad_request_if_input_is_bad
tests_ma.test_core.test_credentials ‑ test_get_credential_async_with_managed_identity_client_id
tests_ma.test_core.test_credentials ‑ test_get_credential_async_without_managed_identity_client_id
tests_ma.test_db.test_events ‑ test_bootstrap_database_failure
tests_ma.test_db.test_events ‑ test_bootstrap_database_success
tests_ma.test_db.test_migrations.test_workspace_migration ‑ test_workspace_migration_moves_fields
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_create_airlock_request_item_creates_an_airlock_request_with_the_right_values
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_request_by_id
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_request_by_id_raises_entity_does_not_exist_if_no_such_request_id
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_for_airlock_manager_active_workspaces_but_no_manager_role
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_for_airlock_manager_multiple_workspaces
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_for_airlock_manager_no_roles
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_for_airlock_manager_single_workspace
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_queries_db
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_with_multiple_filters
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_with_status
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_with_type
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_get_airlock_requests_with_user_id
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_should_retry_update_when_etag_is_not_up_to_date
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[approval_in_progress-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[approval_in_progress-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[blocking_in_progress-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[blocking_in_progress-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[draft-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[draft-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[draft-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[in_review-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[in_review-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[in_review-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[in_review-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[rejection_in_progress-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[rejection_in_progress-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[submitted-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[submitted-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_allowed_new_status_should_update_request_status[submitted-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approval_in_progress-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[approved-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocked_by_scan-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[blocking_in_progress-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[cancelled-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[draft-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[failed-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[in_review-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-failed]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejected-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-blocking_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-in_review]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[rejection_in_progress-submitted]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-approval_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-approved]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-blocked_by_scan]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-cancelled]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-draft]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-rejected]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-rejection_in_progress]
tests_ma.test_db.test_repositories.test_airlock_request_repository ‑ test_update_airlock_request_with_forbidden_status_should_fail_on_validation[submitted-submitted]
tests_ma.test_db.test_repositories.test_base_repository ‑ test_instantiating_a_repo_raises_unable_to_access_database_if_database_cant_be_accessed
tests_ma.test_db.test_repositories.test_operation_repository ‑ test_create_operation_steps_from_multi_step_template
tests_ma.test_db.test_repositories.test_resource_history_repository ‑ test_create_resource_history_item
tests_ma.test_db.test_repositories.test_resource_history_repository ‑ test_create_resource_history_item_throws_error_when_saving
tests_ma.test_db.test_repositories.test_resource_history_repository ‑ test_get_resource_history_by_resource_id_if_found
tests_ma.test_db.test_repositories.test_resource_history_repository ‑ test_get_resource_history_by_resource_id_if_not_found
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_get_enriched_template_returns_the_enriched_template
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_get_enriched_template_returns_the_enriched_template_for_user_resources
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_get_resource_dict_by_id_raises_entity_does_not_exist_if_no_resources_come_back
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_patch_resource_preserves_property_history
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_nested_template_missing_nested_prop
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_nested_template_valid
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_raises_if_user_does_not_have_required_role
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_raises_value_error_if_payload_is_invalid
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_raises_value_error_if_template_does_not_exist

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Unit Test Results

622 tests found (test 389 to 622)

There are 622 tests, see "Raw output" for the list of tests 389 to 622.
Raw output
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_raises_value_error_if_the_user_resource_template_does_not_exist_for_the_given_workspace_service
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_returns_template_version_if_template_is_valid
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_valid_if_required_roles_set_is_empty
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_input_against_template_valid_if_user_has_only_one_role
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_patch_with_bad_fields_fails
tests_ma.test_db.test_repositories.test_resource_repository ‑ test_validate_patch_with_good_fields_passes
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_item_created_with_the_expected_type
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_item_with_pipeline_succeeds
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_template_with_null_pipeline_creates_template_without_pipeline
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_template_with_pipeline_that_has_duplicated_step_id_fails_with_invalid_input_error[pipeline0]
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_template_with_pipeline_that_has_duplicated_step_id_fails_with_invalid_input_error[pipeline1]
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_template_with_pipeline_that_has_duplicated_step_id_fails_with_invalid_input_error[pipeline2]
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_template_with_pipeline_without_duplicated_step_id_succeeds
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_workspace_template_item_calls_create_item_with_the_correct_parameters
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_create_workspace_template_succeeds_without_required
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_by_name_and_version_queries_db
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_by_name_and_version_raises_entity_does_not_exist_if_no_template_found
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_by_name_and_version_returns_matching_template
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_current_by_name_queries_db
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_current_by_name_raises_entity_does_not_exist_if_no_template_found
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_current_by_name_returns_matching_template
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_templates_information_returns_only_templates_user_can_access
tests_ma.test_db.test_repositories.test_resource_templates_repository ‑ test_get_templates_information_returns_unique_template_names
tests_ma.test_db.test_repositories.test_shared_service_repository ‑ test_create_shared_item_raises_value_error_if_template_is_invalid
tests_ma.test_db.test_repositories.test_shared_service_repository ‑ test_create_shared_service_item_creates_a_shared_with_the_right_values
tests_ma.test_db.test_repositories.test_shared_service_repository ‑ test_create_shared_service_item_with_the_same_name_twice_fails
tests_ma.test_db.test_repositories.test_shared_service_repository ‑ test_get_active_shared_services_for_shared_queries_db
tests_ma.test_db.test_repositories.test_shared_service_repository ‑ test_get_shared_service_by_id_raises_if_does_not_exist
tests_ma.test_db.test_repositories.test_shared_service_templates_repository ‑ test_create_shared_service_template_item_calls_create_item_with_the_correct_parameters
tests_ma.test_db.test_repositories.test_shared_service_templates_repository ‑ test_get_templates_for_shared_services_queries_db
tests_ma.test_db.test_repositories.test_user_resource_repository ‑ test_create_user_resource_item_creates_a_user_resource_with_the_right_values
tests_ma.test_db.test_repositories.test_user_resource_repository ‑ test_create_user_resource_item_raises_value_error_if_template_is_invalid
tests_ma.test_db.test_repositories.test_user_resource_repository ‑ test_get_user_resource_by_id_queries_db
tests_ma.test_db.test_repositories.test_user_resource_repository ‑ test_get_user_resource_by_id_raises_entity_does_not_exist_if_not_found
tests_ma.test_db.test_repositories.test_user_resource_repository ‑ test_get_user_resource_returns_resource_if_found
tests_ma.test_db.test_repositories.test_user_resource_repository ‑ test_get_user_resources_for_workspace_queries_db
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_create_user_resource_template_item_calls_create_item_with_the_correct_parameters
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_get_current_user_resource_template_queries_db
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_get_current_user_resource_template_raises_duplicate_entity_if_multiple_current_found
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_get_current_user_resource_template_raises_entity_does_not_exist_if_no_template_found
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_get_current_user_resource_template_returns_matching_template
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_get_template_infos_for_user_resources_queries_db
tests_ma.test_db.test_repositories.test_user_resource_templates_repository ‑ test_get_user_resource_template_by_name_and_version_queries_db
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_automatically_create_application_registration_returns_false
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_automatically_create_application_registration_returns_true
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_create_workspace_item_creates_a_workspace_with_custom_address_space
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_create_workspace_item_creates_a_workspace_with_the_right_values
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_create_workspace_item_raises_value_error_if_template_is_invalid
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_create_workspace_item_throws_exception_with_bad_custom_address_space
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_active_workspaces_queries_db
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_address_space_based_on_size_with_address_space_and_address_spaces
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_address_space_based_on_size_with_address_space_only
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_address_space_based_on_size_with_custom_address_space_and_missing_address
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_address_space_based_on_size_with_large_address_space
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_address_space_based_on_size_with_medium_address_space
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_address_space_based_on_size_with_small_address_space
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_deployed_workspace_by_id_raises_resource_is_not_deployed_if_not_deployed
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_workspace_by_id_queries_db
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_workspace_by_id_raises_entity_does_not_exist_if_item_does_not_exist
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_get_workspaces_queries_db
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_is_workspace_storage_account_available_when_name_available
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_is_workspace_storage_account_available_when_name_not_available
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_workspace_owner_is_not_overwritten_if_present_in_workspace_properties
tests_ma.test_db.test_repositories.test_workpaces_repository ‑ test_workspace_owner_is_set_if_not_present_in_workspace_properties
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_create_workspace_item_raises_value_error_if_template_is_invalid
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_create_workspace_service_item_creates_a_workspace_with_the_right_values
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_get_active_workspace_services_for_workspace_queries_db
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_get_deployed_workspace_service_by_id_raises_resource_is_not_deployed_if_not_deployed
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_get_deployed_workspace_service_by_id_return_workspace_service_if_deployed
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_get_workspace_service_by_id_queries_db
tests_ma.test_db.test_repositories.test_workpaces_service_repository ‑ test_get_workspace_service_by_id_raises_entity_does_not_exist_if_no_available_services
tests_ma.test_models.test_resource ‑ test_resource_is_enabled_returns_correct_value[resource0-True]
tests_ma.test_models.test_resource ‑ test_resource_is_enabled_returns_correct_value[resource1-False]
tests_ma.test_models.test_resource ‑ test_resource_is_enabled_returns_correct_value[resource2-True]
tests_ma.test_models.test_resource ‑ test_user_resource_get_resource_request_message_payload_augments_payload_with_extra_params
tests_ma.test_models.test_resource ‑ test_workspace_service_get_resource_request_message_payload_augments_payload_with_extra_params
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_receiving_bad_json_logs_error[bad]
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_receiving_bad_json_logs_error[{"good": "json", "bad": "message"}]
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_receiving_good_message
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_updating_non_existent_airlock_request_error_is_logged
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_when_updating_and_current_status_differs_from_status_in_state_store_error_is_logged
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_when_updating_and_state_store_exception_error_is_logged
tests_ma.test_service_bus.test_airlock_request_status_update ‑ test_when_updating_and_status_update_is_illegal_error_is_logged
tests_ma.test_service_bus.test_deployment_status_update ‑ test_convert_outputs_to_dict
tests_ma.test_service_bus.test_deployment_status_update ‑ test_multi_step_operation_ends_at_last_step
tests_ma.test_service_bus.test_deployment_status_update ‑ test_multi_step_operation_sends_next_step
tests_ma.test_service_bus.test_deployment_status_update ‑ test_outputs_are_added_to_resource_item
tests_ma.test_service_bus.test_deployment_status_update ‑ test_properties_dont_change_with_no_outputs
tests_ma.test_service_bus.test_deployment_status_update ‑ test_receiving_bad_json_logs_error[bad]
tests_ma.test_service_bus.test_deployment_status_update ‑ test_receiving_bad_json_logs_error[{"good": "json", "bad": "message"}]
tests_ma.test_service_bus.test_deployment_status_update ‑ test_receiving_good_message
tests_ma.test_service_bus.test_deployment_status_update ‑ test_state_transitions_from_deployed_to_deleted
tests_ma.test_service_bus.test_deployment_status_update ‑ test_when_updating_and_state_store_exception
tests_ma.test_service_bus.test_deployment_status_update ‑ test_when_updating_non_existent_workspace_error_is_logged
tests_ma.test_service_bus.test_resource_request_sender ‑ test_multi_step_document_retries
tests_ma.test_service_bus.test_resource_request_sender ‑ test_multi_step_document_sends_first_step
tests_ma.test_service_bus.test_resource_request_sender ‑ test_resource_request_message_generated_correctly[install]
tests_ma.test_service_bus.test_resource_request_sender ‑ test_resource_request_message_generated_correctly[uninstall]
tests_ma.test_service_bus.test_substitutions ‑ test_simple_substitution
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_array_append_remove
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_array_append_replace
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_array_replace_not_found
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_for_primary_resource_no_parents
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_for_shared_service_primary_resource_parents
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_for_user_resource_primary_resource_with_parents
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_for_workspace_primary_resource_parents
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_for_workspace_service_primary_resource__with_parents
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_list_strings
tests_ma.test_service_bus.test_substitutions ‑ test_substitution_props
tests_ma.test_services.test_aad_access_service ‑ test_assign_workspace_user_already_has_role
tests_ma.test_services.test_aad_access_service ‑ test_assign_workspace_user_if_groups
tests_ma.test_services.test_aad_access_service ‑ test_assign_workspace_user_if_no_groups
tests_ma.test_services.test_aad_access_service ‑ test_extract_workspace__raises_error_if_client_id_not_available
tests_ma.test_services.test_aad_access_service ‑ test_extract_workspace__raises_error_if_graph_data_is_invalid
tests_ma.test_services.test_aad_access_service ‑ test_extract_workspace__raises_error_if_owner_not_in_roles
tests_ma.test_services.test_aad_access_service ‑ test_extract_workspace__raises_error_if_researcher_not_in_roles
tests_ma.test_services.test_aad_access_service ‑ test_extract_workspace__returns_sp_id_and_roles
tests_ma.test_services.test_aad_access_service ‑ test_get_assignable_users_returns_users
tests_ma.test_services.test_aad_access_service ‑ test_get_role_assignment_for_user
tests_ma.test_services.test_aad_access_service ‑ test_get_user_by_email
tests_ma.test_services.test_aad_access_service ‑ test_get_user_details_with_batch_of_more_than_20_requests
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_role_by_name
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_role_returns_correct_owner[user0-workspace0-WorkspaceRole.NoRole]
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_role_returns_correct_owner[user1-workspace1-WorkspaceRole.NoRole]
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_role_returns_correct_owner[user2-workspace2-WorkspaceRole.Owner]
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_role_returns_correct_owner[user3-workspace3-WorkspaceRole.Researcher]
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_role_returns_correct_owner[user4-workspace4-WorkspaceRole.AirlockManager]
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_roles_returns_roles
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_user_emails_by_role_assignment_with_groups_and_users_assigned_returned_as_expected
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_user_emails_by_role_assignment_with_only_groups_assigned_returns_group_members
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_user_emails_by_role_assignment_with_single_user_returns_user_mail_and_role_assignment
tests_ma.test_services.test_aad_access_service ‑ test_get_workspace_user_emails_by_role_assignment_with_single_user_with_no_mail_is_not_returned
tests_ma.test_services.test_aad_access_service ‑ test_raises_auth_config_error_if_auth_info_has_incorrect_roles
tests_ma.test_services.test_aad_access_service ‑ test_raises_auth_config_error_if_workspace_auth_config_is_not_set
tests_ma.test_services.test_aad_access_service ‑ test_remove_workspace_user_if_groups
tests_ma.test_services.test_aad_access_service ‑ test_remove_workspace_user_if_no_groups
tests_ma.test_services.test_airlock ‑ test_cancel_request_deletes_review_resource
tests_ma.test_services.test_airlock ‑ test_check_email_exists_passes_if_researcher_or_owner_and_airlock_manager_email_present[role_assignment_details_mock_return0]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_passes_if_researcher_or_owner_and_airlock_manager_email_present[role_assignment_details_mock_return1]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_passes_if_researcher_or_owner_and_airlock_manager_email_present[role_assignment_details_mock_return2]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_raises_417_if_email_not_present[role_assignment_details_mock_return0]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_raises_417_if_email_not_present[role_assignment_details_mock_return1]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_raises_417_if_email_not_present[role_assignment_details_mock_return2]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_raises_417_if_email_not_present[role_assignment_details_mock_return3]
tests_ma.test_services.test_airlock ‑ test_check_email_exists_raises_417_if_email_not_present[role_assignment_details_mock_return4]
tests_ma.test_services.test_airlock ‑ test_delete_review_user_resource_disables_the_resource_before_deletion
tests_ma.test_services.test_airlock ‑ test_get_airlock_requests_by_user_and_workspace_with_status_filter_calls_repo
tests_ma.test_services.test_airlock ‑ test_get_allowed_actions_does_not_return_actions_that_are_forbidden_to_the_user_role[cancel-endpoint_roles1-airlock_request_repo_mock]
tests_ma.test_services.test_airlock ‑ test_get_allowed_actions_does_not_return_actions_that_are_forbidden_to_the_user_role[review-endpoint_roles0-airlock_request_repo_mock]
tests_ma.test_services.test_airlock ‑ test_get_allowed_actions_does_not_return_actions_that_are_forbidden_to_the_user_role[submit-endpoint_roles2-airlock_request_repo_mock]
tests_ma.test_services.test_airlock ‑ test_get_allowed_actions_requires_same_roles_as_endpoint[cancel-required_roles1-airlock_request_repo_mock]
tests_ma.test_services.test_airlock ‑ test_get_allowed_actions_requires_same_roles_as_endpoint[review-required_roles0-airlock_request_repo_mock]
tests_ma.test_services.test_airlock ‑ test_get_allowed_actions_requires_same_roles_as_endpoint[submit-required_roles2-airlock_request_repo_mock]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_and_write_permissions_for_draft_requests
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[approval_in_progress]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[approved]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[blocked_by_scan]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[blocking_in_progress]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[cancelled]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[in_review]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[rejected]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[rejection_in_progress]
tests_ma.test_services.test_airlock ‑ test_get_required_permission_return_read_only_permissions_for_non_draft_requests[submitted]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_notification_if_email_not_present[email_mock_return0]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_notification_if_email_not_present[email_mock_return1]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_417_if_email_not_present[email_mock_return0]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_417_if_email_not_present[email_mock_return1]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_417_if_email_not_present[email_mock_return2]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_417_if_email_not_present[email_mock_return3]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_417_if_email_not_present[email_mock_return4]
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_503_if_publish_event_fails
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_raises_503_if_save_to_db_fails
tests_ma.test_services.test_airlock ‑ test_save_and_publish_event_airlock_request_saves_item
tests_ma.test_services.test_airlock ‑ test_update_and_publish_event_airlock_request_raises_400_if_status_update_invalid
tests_ma.test_services.test_airlock ‑ test_update_and_publish_event_airlock_request_raises_503_if_publish_event_fails
tests_ma.test_services.test_airlock ‑ test_update_and_publish_event_airlock_request_sends_status_changed_event
tests_ma.test_services.test_airlock ‑ test_update_and_publish_event_airlock_request_updates_item
tests_ma.test_services.test_airlock ‑ test_update_and_publish_event_airlock_request_without_status_change_should_not_send_status_changed_event
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_canceled_request
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_in_progress_request[approval_in_progress]
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_in_progress_request[blocking_in_progress]
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_in_progress_request[rejection_in_progress]
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_unaccessible_request[blocked_by_scan]
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_unaccessible_request[failed]
tests_ma.test_services.test_airlock ‑ test_validate_request_status_raises_error_for_unaccessible_request[rejected]
tests_ma.test_services.test_airlock ‑ test_validate_user_is_allowed_to_access_grants_access_to_user_with_a_valid_role
tests_ma.test_services.test_airlock ‑ test_validate_user_is_allowed_to_access_sa_blocks_access_as_expected
tests_ma.test_services.test_azure_resource_status ‑ test_get_azure_resource_status__correct_status_returned_for_vm
tests_ma.test_services.test_azure_resource_status ‑ test_get_azure_resource_status__empty_status_returned_unknown
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__invalid_netmask_raises_exception
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__invalid_network_raises_exception
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses0-24-10.2.5.0/24]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses1-16-10.3.0.0/16]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses2-24-10.2.0.0/24]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses3-16-10.2.0.0/16]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses4-24-10.2.0.0/24]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses5-16-10.3.0.0/16]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses6-16-10.4.0.0/16]
tests_ma.test_services.test_cidr_service ‑ test_generate_new_cidr__returns_currect_block[input_addresses7-20-10.2.16.0/20]
tests_ma.test_services.test_cidr_service ‑ test_is_network_available__returns_false
tests_ma.test_services.test_cidr_service ‑ test_is_network_available__returns_true
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_for_unsupported_subscription_raises_subscription_not_supported_exception
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_dates_set_as_none_calls_client_with_custom_dates
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_dates_set_as_none_calls_client_with_month_to_date[None-None]
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_dates_set_as_none_calls_client_with_month_to_date[None-to_date0]
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_dates_set_as_none_calls_client_with_month_to_date[from_date1-None]
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_granularity_daily_and_missing_costs_data_returns_empty_cost_report
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_granularity_daily_returns_correct_cost_report
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_granularity_none_and_display_name_data_returns_template_name_in_cost_report
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_granularity_none_and_missing_costs_data_returns_empty_cost_report
tests_ma.test_services.test_cost_service ‑ test_query_tre_costs_with_granularity_none_returns_correct_cost_report
tests_ma.test_services.test_cost_service ‑ test_query_tre_workspace_costs_with_granularity_daily_returns_correct_workspace_cost_report
tests_ma.test_services.test_cost_service ‑ test_query_tre_workspace_costs_with_granularity_none_returns_correct_workspace_cost_report
tests_ma.test_services.test_health_checker ‑ test_get_resource_processor_status_healthy
tests_ma.test_services.test_health_checker ‑ test_get_resource_processor_status_not_healthy
tests_ma.test_services.test_health_checker ‑ test_get_resource_processor_status_other_exception
tests_ma.test_services.test_health_checker ‑ test_get_service_bus_status_not_responding
tests_ma.test_services.test_health_checker ‑ test_get_service_bus_status_other_exception
tests_ma.test_services.test_health_checker ‑ test_get_service_bus_status_responding
tests_ma.test_services.test_health_checker ‑ test_get_state_store_status_not_responding
tests_ma.test_services.test_health_checker ‑ test_get_state_store_status_other_exception
tests_ma.test_services.test_health_checker ‑ test_get_state_store_status_responding
tests_ma.test_services.test_schema_service ‑ test_enrich_template_adds_read_only_on_update
tests_ma.test_services.test_schema_service ‑ test_enrich_template_adds_system_properties
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_properties[original0-extra10-extra20-expected0]
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_properties[original1-extra11-extra21-expected1]
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_properties[original2-extra12-extra22-expected2]
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_properties[original3-extra13-extra23-expected3]
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_required[original0-extra10-extra20-expected0]
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_required[original1-extra11-extra21-expected1]
tests_ma.test_services.test_schema_service ‑ test_enrich_template_combines_required[original2-extra12-extra22-expected2]
tests_ma.test_services.test_schema_service ‑ test_enrich_user_resource_template_enriches_with_user_resource_defaults
tests_ma.test_services.test_schema_service ‑ test_enrich_workspace_service_template_enriches_with_workspace_service_defaults
tests_ma.test_services.test_schema_service ‑ test_enrich_workspace_template_enriches_with_workspace_defaults_and_aad