Exemplo n.º 1
0
def setup(request):
    _tenant = Tenant(CONFIG.TENANT_INDEX)

    for ann in _tenant.list_announcements():
        _tenant.delete_announcement(ann.id)

    def finalize():
        for ann in _tenant.list_announcements():
            _tenant.delete_announcement(ann.id)

    request.addfinalizer(finalize)
    return _tenant
Exemplo n.º 2
0
def setup(request):
    _tenant = Tenant(CONFIG.TENANT_INDEX)

    for ann in _tenant.list_announcements():
        _tenant.delete_announcement(ann.id)
    _tenant.post_announcement(**TEST_EXCHANGE_ANNOUNCEMENT)

    def finalize():
        for ann in _tenant.list_announcements():
            _tenant.delete_announcement(ann.id)

    request.addfinalizer(finalize)
    return _tenant
Exemplo n.º 3
0
def setup(request):
    _tenant = Tenant(CONFIG.TENANT_INDEX)
    _exchange = Tenant(CONFIG.TENANT_INDEX).get_exchange()
    _main = Main(CONFIG.MAIN_INDEX)

    for ann in _tenant.list_announcements():
        _tenant.delete_announcement(ann.id)

    _tenant.post_announcement(**TEST_EXCHANGE_ANNOUNCEMENT_MODIFIED)

    def finalize():
        for ann in _tenant.list_announcements():
            _tenant.delete_announcement(ann.id)

    request.addfinalizer(finalize)
    return _tenant, _exchange, _main