コード例 #1
0
def create_campaign(campaign_name, duties=[]):
    show_browser(True)  # for test coverage report
    visit('/admin/volunteering/campaign/')
    click(description='Add')
    form()['name'] = campaign_name
    form()['slug'] = slugify(campaign_name)
    submit()
    for duty in duties:
        duty_name = duty['Name']
        create_duty(duty_name, duty['Attributes'])
        create_campaign_duty(campaign_name, duty_name)
コード例 #2
0
def show_the_browser(step):
    show_browser()