Logo Search packages:      
Sourcecode: ubuntu-sso-client version File versions  Download package

def ubuntu_sso::tests::test_key_acls::Loader::test_set_single_acl (   self  ) 

Does set_single_acl work?

Definition at line 77 of file test_key_acls.py.

00077                                  :
        """Does set_single_acl work?"""
        giifr = self.mocker.replace("ubuntu_sso.key_acls.get_item_ids_for_realm")
        igas = self.mocker.replace("gnomekeyring.item_get_acl_sync")
        isas = self.mocker.replace("gnomekeyring.item_set_acl_sync")
        acon = self.mocker.replace("gnomekeyring.AccessControl")
        self.expect(giifr("realm", "consumer_key")).result([999])
        self.expect(igas(None, 999)).result([])
        ac1 = self.mocker.mock()
        self.expect(acon(ANY, ANY)).result(ac1)
        ac1.set_display_name("application_name")
        ac1.set_path_name("/tmp/exe_path")
        self.expect(isas(None, 999, [ac1])).result(None)
        self.expect(giifr("realm2", "consumer_key2")).result([9999])
        self.expect(igas(None, 9999)).result([])
        ac2 = self.mocker.mock()
        self.expect(acon(ANY, ANY)).result(ac2)
        ac2.set_display_name("application_name2")
        ac2.set_path_name("/tmp/exe_path2")
        self.expect(isas(None, 9999, [ac2])).result(None)
        self.mocker.replay()

        set_single_acl([
          ("realm", "consumer_key", "/tmp/exe_path", "application_name"),
          ("realm2", "consumer_key2", "/tmp/exe_path2", "application_name2"),
        ])

    def test_etc_files_parsed(self):


Generated by  Doxygen 1.6.0   Back to index