Beispiel #1
0
def test_bulk_edit_for_non_unique(settings):
    settings.ROOT_URLCONF = __name__
    request = staff_req('get')
    p = Admin.list(
        request=request,
        app_name='tests',
        model_name='adminunique',
        parts__list_tests_adminunique__columns__foo__bulk__include=True,
    )
    p = p.bind(request=request)
    assert [x._name for x in values(p.parts.list_tests_adminunique.columns) if x.bulk.include] == ['foo']
Beispiel #2
0
def test_bulk_edit_for_non_unique():
    request = req('get')
    request.user = Struct(is_staff=True)
    p = Admin.list(request=request, app_name='tests', model_name='adminunique')
    p = p.bind(request=request)
    assert [x._name for x in values(p.parts.list_tests_adminunique.columns) if x.bulk.include] == ['foo']