|
@@ -156,7 +156,6 @@ def django_db_all(func=None, *, transaction=None, reset_sequences=None, **kwargs
|
|
|
return decorator
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture
|
|
|
def factories():
|
|
|
# XXX(dcramer): hack to prevent recursive imports
|
|
@@ -192,12 +191,6 @@ def burst_task_runner():
|
|
|
return BurstTaskRunner
|
|
|
|
|
|
|
|
|
-@pytest.fixture(scope="function")
|
|
|
-def session():
|
|
|
- return factories.create_session()
|
|
|
-
|
|
|
-
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_user(factories):
|
|
|
"""A default (super)user with email ``admin@localhost`` and password ``admin``.
|
|
@@ -207,7 +200,6 @@ def default_user(factories):
|
|
|
return factories.create_user(email="admin@localhost", is_superuser=True)
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_organization(factories, default_user):
|
|
|
"""A default organization (slug=``baz``) owned by the ``default_user`` fixture.
|
|
@@ -219,7 +211,6 @@ def default_organization(factories, default_user):
|
|
|
return factories.create_organization(name="baz", slug="baz", owner=default_user)
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_team(factories, default_organization):
|
|
|
from sentry.models.organizationmember import OrganizationMember
|
|
@@ -233,41 +224,27 @@ def default_team(factories, default_organization):
|
|
|
return team
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_project(factories, default_team):
|
|
|
return factories.create_project(name="Bar", slug="bar", teams=[default_team])
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_projectkey(factories, default_project):
|
|
|
return factories.create_project_key(project=default_project)
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_environment(factories, default_project):
|
|
|
return factories.create_environment(name="development", project=default_project)
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_group(factories, default_project):
|
|
|
# こんにちは konichiwa
|
|
|
return factories.create_group(project=default_project, message="\u3053\u3093\u306b\u3061\u306f")
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
-@pytest.fixture(scope="function")
|
|
|
-def default_event(factories, default_group):
|
|
|
- return factories.store_event(
|
|
|
- data={"event_id": "a" * 32, "message": "\u3053\u3093\u306b\u3061\u306f"},
|
|
|
- project_id=default_project.id,
|
|
|
- )
|
|
|
-
|
|
|
-
|
|
|
-@pytest.mark.django_db
|
|
|
@pytest.fixture(scope="function")
|
|
|
def default_activity(default_group, default_project, default_user):
|
|
|
from sentry.models.activity import Activity
|