~homeworkprod/byceps

ddfc0af684e363e5939489b6a7fa83495d1e9150 — Jochen Kupperschmidt 2 months ago 92c5039
Use separate brand/party/site fixtures for settings tests
M tests/integration/services/brand/test_settings_service.py => tests/integration/services/brand/test_settings_service.py +13 -2
@@ 3,11 3,22 @@
:License: Modified BSD, see LICENSE for details.
"""

from byceps.services.brand import settings_service
import pytest

from byceps.services.brand import service as brand_service, settings_service
from byceps.services.brand.transfer.models import BrandSetting

from tests.helpers import create_brand


BRAND_ID = 'value-brand'


BRAND_ID = 'acmecon'
@pytest.fixture(scope='module')
def brand(admin_app):
    brand = create_brand(BRAND_ID, 'ValueBrand')
    yield brand
    brand_service.delete_brand(brand.id)


def test_create(brand):

M tests/integration/services/party/test_settings_service.py => tests/integration/services/party/test_settings_service.py +11 -2
@@ 5,11 5,20 @@

import pytest

from byceps.services.party import settings_service
from byceps.services.party import service as party_service, settings_service
from byceps.services.party.transfer.models import PartySetting

from tests.helpers import create_party

PARTY_ID = 'acmecon-2014'

PARTY_ID = 'favorite-party'


@pytest.fixture(scope='module')
def party(brand):
    party = create_party(brand.id, PARTY_ID, 'My favorite party!')
    yield party
    party_service.delete_party(party.id)


def test_create(party):

M tests/integration/services/site/test_settings_service.py => tests/integration/services/site/test_settings_service.py +17 -2
@@ 3,11 3,26 @@
:License: Modified BSD, see LICENSE for details.
"""

from byceps.services.site import settings_service
import pytest

from byceps.services.site import service as site_service, settings_service
from byceps.services.site.transfer.models import SiteSetting

from tests.helpers import create_site


SITE_ID = 'favorite-site'

SITE_ID = 'acmecon-2014-website'

@pytest.fixture(scope='module')
def site(admin_app, email_config):
    site = create_site(
        site_id=SITE_ID,
        title='My favorite site!',
        server_name='www.favorite-site.test',
    )
    yield site
    site_service.delete_site(site.id)


def test_create(site):