Exemple #1
0
def test_assign_menu_form_no_permission(staff_user, menu, site_settings):
    data = {'top_menu': menu.pk, 'bottom_menu': ''}
    form = AssignMenuForm(data=data, user=staff_user, instance=site_settings)
    assert form.fields['top_menu'].disabled
    assert form.fields['bottom_menu'].disabled
    assert form.is_valid()
Exemple #2
0
def test_assign_menu_form(admin_user, menu, site_settings):
    data = {'top_menu': menu.pk, 'bottom_menu': ''}
    form = AssignMenuForm(data=data, instance=site_settings)
    assert form.is_valid()
Exemple #3
0
def test_assign_menu_form(admin_user, menu, site_settings):
    data = {'top_menu': menu.pk, 'bottom_menu': ''}
    form = AssignMenuForm(data=data, instance=site_settings)
    assert form.is_valid()