def test_home_template(home_resp):
    dj_assert_template_used(home_resp, template_name='core/index.html')
Пример #2
0
def test_migrate_page_status_code(client_with_user, mock_generater_token):
    resp = client_with_user.get(reverse('migrate_to_memberkit'))
    dj_assert_template_used(resp, 'memberkit/migration_form.html')
    assert resp.status_code == 200
    assert not mock_generater_token.called
Пример #3
0
def test_member_access_client_content(resp_member_accessing_client_content):
    dj_assert_template_used(resp_member_accessing_client_content, 'topics/topic_detail.html')
Пример #4
0
def test_video_template(resp):
    dj_assert_template_used(resp, 'topics/topic_detail.html')
Пример #5
0
def test_client_content_accesed_by_member(client_with_member, modules):
    resp = generate_resp('pytools', client_with_member)
    dj_assert_template_used(resp, 'modules/module_detail.html')
Пример #6
0
def test_video_template(resp_python_birds_user_without_subscription):
    dj_assert_template_used(resp_python_birds_user_without_subscription,
                            'topics/topic_detail.html')
def test_live_class_landing_for_client(cohort, resp_client):
    dj_assert_template_used(resp_client, 'cohorts/live_class_landing_page.html')
def test_should_has_a_lite_version(client):
    resp = client.get(reverse('core:lead_landing_lite'))
    dj_assert_template_used(resp, 'core/lead_landing_lite_page.html')
Пример #9
0
def test_level_three_access_level_three_content(
        resp_level_three_accessing_level_three_content):
    dj_assert_template_used(resp_level_three_accessing_level_three_content,
                            'topics/topic_detail.html')
Пример #10
0
def test_webdev_access_webdev_content(resp_webdev_accessing_webdev_content):
    dj_assert_template_used(resp_webdev_accessing_webdev_content,
                            'topics/topic_detail.html')
Пример #11
0
def test_advanced_user_access_advanced_content(
        resp_advanced_user_accessing_advanced_content):
    dj_assert_template_used(resp_advanced_user_accessing_advanced_content,
                            'topics/topic_detail.html')
Пример #12
0
def test_leads_form_when_subscription_closed(resp_closed_subscriptions):
    dj_assert_template_used(resp_closed_subscriptions, "core/leads_form.html")
Пример #13
0
def test_client_hitting_member_landing_page(
        resp_client_accessing_member_content):
    dj_assert_template_used(resp_client_accessing_member_content,
                            'topics/content_member_landing_page.html')
Пример #14
0
def test_migration_fail_for_user_without_subscriptions(client_with_user):
    resp = client_with_user.post(reverse('migrate_to_memberkit'))
    dj_assert_template_used(resp, 'memberkit/manual_migration.html')
def test_live_class_landing_for_lead(cohort, resp_lead):
    dj_assert_template_used(resp_lead, 'cohorts/live_class_landing_page.html')
def test_should_has_a_normal_version(resp):
    dj_assert_template_used(resp, 'core/lead_landing_page.html')
Пример #17
0
def test_webinar_landing_for_client(cohort, resp_client):
    dj_assert_template_used(resp_client, 'cohorts/webinar_landing_page.html')
Пример #18
0
def test_client_content(client_with_client, modules):
    resp = generate_resp('pytools', client_with_client)
    dj_assert_template_used(resp, 'modules/module_detail.html')
Пример #19
0
def test_webinar_landing_for_lead(cohort, resp_lead):
    dj_assert_template_used(resp_lead, 'cohorts/webinar_landing_page.html')
Пример #20
0
def test_invalid_data(client, slug):
    dct = {'name': 'Foo Bar Baz', 'email': 'foo', 'phone': '129'}
    resp = make_post(client, dct, slug)
    assert resp.status_code == 400
    dj_assert_template_used('django_pagarme/contact_form_errors.html')
Пример #21
0
def test_lead_not_able_to_access_forum(client_with_lead, mocker, logged_user):
    tag_as = mocker.patch('pythonpro.discourse.views.tag_as')
    discourse_path = reverse('discourse:sso')
    response = client_with_lead.get(discourse_path, secure=True)
    dj_assert_template_used(response, 'discourse/landing_page.html')
    tag_as.assert_called_once_with(logged_user.email, 'potencial-member')