~homeworkprod/byceps

ref: a3214d27456b4060727966ca1ad520a92edaa6b2 byceps/testfixtures/party.py -rw-r--r-- 646 bytes
a3214d27 — Jochen Kupperschmidt Make tourney avatar path depend on party path, but non-configurable besides that 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
testfixtures.party
~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""

from datetime import datetime

from byceps.services.party.models.party import Party

from .brand import create_brand


def create_party(
    *,
    id='acmecon-2014',
    brand_id=None,
    title='Acme Entertainment Convention 2014',
    shop_id=None,
):
    if brand_id is None:
        brand = create_brand()
        brand_id = brand.id

    starts_at = datetime(2014, 10, 24, 16, 0)
    ends_at = datetime(2014, 10, 26, 13, 0)

    return Party(id, brand_id, title, starts_at, ends_at, shop_id=shop_id)