'Set a users emabargo state.'

def user_is_embargoed(self, user, is_embargoed):

    user_profile = UserFactory(username=user.username, email=user.email).profile
    user_profile.allow_certificate = (not is_embargoed)
    user_profile.save()
