@pytest.mark.django_db
@pytest.mark.parametrize('model', (Resource, Unit))
def test_period_inline_containing_admins_work(rf, admin_user, model, space_resource, test_unit):
    if (model is Resource):
        instance = space_resource
    elif (model is Unit):
        instance = test_unit
    else:
        raise NotImplementedError('Unexpected parametrization')
    admin = admin_site._registry[model]
    request = rf.get('/')
    request.user = admin_user
    response = admin.change_view(request, instance.pk)
    assert_response_contains(response, prefix_weekday(2, 'opens'))
@pytest.mark.django_db
@pytest.mark.parametrize('model', (Resource, Unit))
def test_period_inline_containing_admins_work(rf, admin_user, model, space_resource, test_unit):
    if (model is Resource):
        instance = space_resource
    elif (model is Unit):
        instance = test_unit
    else:
        raise NotImplementedError('Unexpected parametrization')
    admin = admin_site._registry[model]
    request = rf.get('/')
    request.user = admin_user
    response = admin.change_view(request, instance.pk)
    assert_response_contains(response, prefix_weekday(2, 'opens'))