~homeworkprod/byceps

c68c1eeab91f9d9fa006b574cf9168d64dadc272 — Jochen Kupperschmidt 4 years ago 662f65c
Provide party tuple instead of entity
3 files changed, 4 insertions(+), 3 deletions(-)

M byceps/blueprints/party/views.py
M tests/base.py
M tests/helpers.py
M byceps/blueprints/party/views.py => byceps/blueprints/party/views.py +1 -1
@@ 27,7 27,7 @@ def before_request():
    if party is None:
        raise Exception('Unknown party ID "{}".'.format(party_id))

    g.party = party
    g.party = party.to_tuple()


@blueprint.route('/info')

M tests/base.py => tests/base.py +2 -1
@@ 99,10 99,11 @@ class AbstractAppTestCase(TestCase):
        db.session.add(party)
        db.session.commit()

        return party
        return party.to_tuple()

    def set_brand_email_sender_address(self, brand_id, sender_address):
        email_config = EmailConfig(brand_id, sender_address)

        db.session.add(email_config)
        db.session.commit()


M tests/helpers.py => tests/helpers.py +1 -1
@@ 27,7 27,7 @@ def app_context(*, config_filename=CONFIG_FILENAME_TEST_PARTY):
@contextmanager
def current_party_set(app, party):
    def handler(sender, **kwargs):
        g.party = party
        g.party = party.to_tuple()

    with appcontext_pushed.connected_to(handler, app):
        yield