~homeworkprod/byceps

ref: 43bf3630475839afde6e691f0ac561dcb01aaba6 byceps/testfixtures/party.py -rw-r--r-- 606 bytes
43bf3630 — Jochen Kupperschmidt Upgrade pytest on Travis CI to get v3.3 rather than v3.0 provided by default 4 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
"""
testfixtures.party
~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2017 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='acme-2014', brand_id=None,
                 title='Acme Entertainment Convention 2014'):
    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)