382
382
not isinstance(x, core.svn_auth_provider_object_t),
385
def testGnomeKeyring(self):
386
if not hasattr(core, 'svn_auth_set_gnome_keyring_unlock_prompt_func'):
387
# gnome-keying not compiled in, do nothing
390
# This tests setting the gnome-keyring unlock prompt function as an
391
# auth baton parameter. It doesn't actually call gnome-keyring
392
# stuff, since that would require having a gnome-keyring running. We
393
# just test if this doesn't error out, there's not even a return
395
def prompt_func(realm_string, pool):
398
core.svn_auth_set_gnome_keyring_unlock_prompt_func(self.client_ctx.auth_baton, prompt_func)
400
def proplist_receiver_trunk(self, path, props, iprops, pool):
401
self.assertEquals(props['svn:global-ignores'], '*.q\n')
402
self.proplist_receiver_trunk_calls += 1
404
def proplist_receiver_dir1(self, path, props, iprops, pool):
405
self.assertEquals(iprops[self.proplist_receiver_dir1_key],
406
{'svn:global-ignores':'*.q\n'})
407
self.proplist_receiver_dir1_calls += 1
409
def test_inherited_props(self):
410
"""Test inherited props"""
412
trunk_url = self.repos_uri + '/trunk'
413
client.propset_remote('svn:global-ignores', '*.q', trunk_url,
414
False, 12, {}, None, self.client_ctx)
416
head = core.svn_opt_revision_t()
417
head.kind = core.svn_opt_revision_head
418
props, iprops, rev = client.propget5('svn:global-ignores', trunk_url,
419
head, head, core.svn_depth_infinity,
420
None, self.client_ctx)
421
self.assertEquals(props[trunk_url], '*.q\n')
423
dir1_url = trunk_url + '/dir1'
424
props, iprops, rev = client.propget5('svn:global-ignores', dir1_url,
425
head, head, core.svn_depth_infinity,
426
None, self.client_ctx)
427
self.assertEquals(iprops[trunk_url], {'svn:global-ignores':'*.q\n'})
429
self.proplist_receiver_trunk_calls = 0
430
client.proplist4(trunk_url, head, head, core.svn_depth_empty, None, True,
431
self.proplist_receiver_trunk, self.client_ctx)
432
self.assertEquals(self.proplist_receiver_trunk_calls, 1)
434
self.proplist_receiver_dir1_calls = 0
435
self.proplist_receiver_dir1_key = trunk_url
436
client.proplist4(dir1_url, head, head, core.svn_depth_empty, None, True,
437
self.proplist_receiver_dir1, self.client_ctx)
438
self.assertEquals(self.proplist_receiver_dir1_calls, 1)
386
442
return unittest.defaultTestLoader.loadTestsFromTestCase(
387
443
SubversionClientTestCase)