Ejemplo n.º 1
0
def assert_user_promoted(user, slug):
    if slug.startswith('membership'):
        assert core_facade.is_member(user)
    elif slug.startswith('webdev') or slug == 'treinamento-devpro-webinar':
        assert core_facade.is_webdev(user)
    elif slug.startswith('data-science'):
        assert core_facade.is_data_scientist(user)
    elif slug in {'bootcamp', 'bootcamp-webdev'}:
        assert core_facade.is_bootcamper(user)
        assert core_facade.is_pythonista(
            user)  # bonus because of full paid price
    elif slug.startswith('bootcamp'):
        assert core_facade.is_bootcamper(user)
    elif slug == 'pacote-proximo-nivel-67-discount':
        assert core_facade.is_pythonista(user)
    else:
        pytest.fail(f'Invalid slug prefix {slug}')
Ejemplo n.º 2
0
def assert_user_promoted(user, slug):
    if slug.startswith('membership'):
        assert core_facade.is_member(user)
    elif slug.startswith('webdev'):
        assert core_facade.is_webdev(user)
    elif slug.startswith('data-science'):
        assert core_facade.is_data_scientist(user)
    elif slug.startswith('bootcamp'):
        assert core_facade.is_bootcamper(user)
    else:
        pytest.fail(f'Invalid slug prefix {slug}')