Ejemplo n.º 1
0
    def after_update(self):
        # checks if there is new applications and update all the user
        # profiles on the system
        store = new_store()
        update_profile_applications(store)

        # Updating the parameter list
        sysparam.ensure_system_parameters(store, update=True)
        store.commit(close=True)
Ejemplo n.º 2
0
    def after_update(self):
        # checks if there is new applications and update all the user
        # profiles on the system
        store = new_store()
        update_profile_applications(store)
        store.commit(close=True)

        # Updating the parameter list
        ensure_system_parameters(update=True)
Ejemplo n.º 3
0
    def test_update_profile_applications(self):
        profile = UserProfile(store=self.store, name=u'assistant')

        profile.add_application_reference(u'stock', has_permission=True)
        items = profile.profile_settings
        assert len(list(items)) == 1

        new_profile = UserProfile(store=self.store, name=u'assistant')
        update_profile_applications(self.store, new_profile)
        items = new_profile.profile_settings
Ejemplo n.º 4
0
    def test_update_profile_applications(self):
        profile = UserProfile(store=self.store, name=u'assistant')

        profile.add_application_reference(u'stock',
                                          has_permission=True)
        items = profile.profile_settings
        assert len(list(items)) == 1

        new_profile = UserProfile(store=self.store, name=u'assistant')
        update_profile_applications(self.store, new_profile)
        items = new_profile.profile_settings