Conditionally skip tests related to audit log
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from atst.domain.application_roles import ApplicationRoles
|
||||
from atst.models import ApplicationRoleStatus
|
||||
from atst.models import AuditEvent
|
||||
@@ -34,6 +36,7 @@ def test_application_members_excludes_deleted(session):
|
||||
assert app.members[0].id == member_role.id
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_audit_event_for_application_deletion(session):
|
||||
app = ApplicationFactory.create()
|
||||
app.deleted = True
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from atst.domain.permission_sets import PermissionSets
|
||||
from atst.domain.environment_roles import EnvironmentRoles
|
||||
from atst.models.audit_event import AuditEvent
|
||||
@@ -5,6 +7,7 @@ from atst.models.audit_event import AuditEvent
|
||||
from tests.factories import *
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_has_application_role_history(session):
|
||||
owner = UserFactory.create()
|
||||
user = UserFactory.create()
|
||||
|
@@ -32,6 +32,7 @@ def test_add_user_to_environment():
|
||||
assert developer in dev_environment.users
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_audit_event_for_environment_deletion(session):
|
||||
env = EnvironmentFactory.create(application=ApplicationFactory.create())
|
||||
env.deleted = True
|
||||
|
@@ -12,6 +12,7 @@ from tests.factories import *
|
||||
from atst.domain.portfolio_roles import PortfolioRoles
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_has_no_portfolio_role_history(session):
|
||||
owner = UserFactory.create()
|
||||
user = UserFactory.create()
|
||||
@@ -29,6 +30,7 @@ def test_has_no_portfolio_role_history(session):
|
||||
assert not create_event.changed_state
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_has_portfolio_role_history(session):
|
||||
owner = UserFactory.create()
|
||||
user = UserFactory.create()
|
||||
@@ -56,6 +58,7 @@ def test_has_portfolio_role_history(session):
|
||||
assert set(new_state) == PortfolioRoles.DEFAULT_PORTFOLIO_PERMISSION_SETS
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_has_portfolio_status_history(session):
|
||||
owner = UserFactory.create()
|
||||
user = UserFactory.create()
|
||||
@@ -82,6 +85,7 @@ def test_has_portfolio_status_history(session):
|
||||
assert changed_events[0].changed_state["status"][1] == "active"
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_has_no_env_role_history(session):
|
||||
owner = UserFactory.create()
|
||||
user = UserFactory.create()
|
||||
@@ -104,6 +108,7 @@ def test_has_no_env_role_history(session):
|
||||
assert not create_event.changed_state
|
||||
|
||||
|
||||
@pytest.mark.audit_log
|
||||
def test_has_env_role_history(session):
|
||||
user = UserFactory.create()
|
||||
application = ApplicationFactory.create()
|
||||
|
Reference in New Issue
Block a user