Completed
Push — main ( cd54d0...3ec8de )
by Jochen
03:28
created

orderer()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
"""
2
:Copyright: 2006-2020 Jochen Kupperschmidt
3
:License: Modified BSD, see LICENSE for details.
4
"""
5
6
import pytest
7
8
from byceps.services.shop.article import service as article_service
9
from byceps.services.ticketing import (
10
    category_service as ticket_category_service,
11
)
12
13
from testfixtures.shop_order import create_orderer
14
15
from tests.integration.services.shop.helpers import create_article
16
17
18
@pytest.fixture
19
def article(shop):
20
    article = create_article(shop.id, total_quantity=10)
21
    article_id = article.id
22
    yield article
23
    article_service.delete_article(article_id)
24
25
26
@pytest.fixture
27
def ticket_category(party):
28
    category = ticket_category_service.create_category(party.id, 'Deluxe')
29
    yield category
30
    ticket_category_service.delete_category(category.id)
31
32
33
@pytest.fixture
34
def orderer(make_user_with_detail):
35
    return create_orderer(make_user_with_detail('TicketsOrderer'))
36