Пример #1
0
 def setUp(self):
     self.provider = mock.Mock(name='provider', spec=Provider1)
     all_providers.fake_plugins([
         mock.Mock(name='plugin',
                   spec=Provider1PlugIn,
                   plugin_name='{}/fake.provider'.format(
                       get_secure_PROVIDERPATH_list()[0]),
                   plugin_object=self.provider)
     ])
Пример #2
0
 def setUp(self):
     self.provider = mock.Mock(name='provider', spec=Provider1)
     all_providers.fake_plugins([
         mock.Mock(
             name='plugin',
             spec=Provider1PlugIn,
             plugin_name='{}/fake.provider'.format(
                 get_secure_PROVIDERPATH_list()[0]),
             plugin_object=self.provider)
     ])
Пример #3
0
def get_insecure_PROVIDERPATH_list():
    """
    Computes the insecure value of PROVIDERPATH.

    This value is *not* used by `plainbox-trusted-launcher-1` executable since
    it would involve reading files outside of the control by the local
    administrator. This value is used for handing non-root jobs.

    :returns:
        A list of three strings:
        * `/usr/local/share/plainbox-providers-1`
        * `/usr/share/plainbox-providers-1`
        * `$XDG_DATA_HOME/plainbox-providers-1`
    """
    return get_secure_PROVIDERPATH_list() + [get_user_PROVIDERPATH_entry()]
Пример #4
0
def get_insecure_PROVIDERPATH_list():
    """
    Computes the insecure value of PROVIDERPATH.

    This value is *not* used by `plainbox-trusted-launcher-1` executable since
    it would involve reading files outside of the control by the local
    administrator. This value is used for handing non-root jobs.

    :returns:
        A list of three strings:
        * `/usr/local/share/plainbox-providers-1`
        * `/usr/share/plainbox-providers-1`
        * `$XDG_DATA_HOME/plainbox-providers-1`
    """
    return get_secure_PROVIDERPATH_list() + [get_user_PROVIDERPATH_entry()]