def test_default_disable():
    from autonomie.forms.user.user import deferred_company_disable_default
    companies = [Dummy(employees=range(2))]
    user = Dummy(companies=companies)
    req = Dummy(context=user)
    assert not deferred_company_disable_default("", {'request': req})
    companies = [Dummy(employees=[1])]
    user = Dummy(companies=companies)
    req = Dummy(context=user)
    assert(deferred_company_disable_default("", {'request': req}))