@@ -190,8 +190,8 @@ def test_connect_auth(self):
190190 client .close ()
191191
192192 def test_unicode_auth (self ):
193- username = u ("xe4/\hm" )
194- password = u ("/\xe4 hm" )
193+ username = u (r "xe4/\hm" )
194+ password = u (r "/\xe4hm" )
195195 digest_auth = "%s:%s" % (username , password )
196196 acl = self ._makeAuth (username , password , all = True )
197197
@@ -774,10 +774,11 @@ def test_ensure_path(self):
774774 client .ensure_path ("/1/2/3/4" )
775775 assert client .exists ("/1/2/3/4" )
776776
777- @pytest .mark .skip ("BUG: sync() call is not chroot'd" )
778777 def test_sync (self ):
779778 client = self .client
780- assert client .sync ('/' ) == '/'
779+ assert client .sync ("/" ) == "/"
780+ # Albeit surprising, you can sync anything, even what does not exist.
781+ assert client .sync ("/not_there" ) == "/not_there"
781782
782783 def test_exists (self ):
783784 nodepath = "/" + uuid .uuid4 ().hex
@@ -1366,9 +1367,11 @@ def test_create(self):
13661367
13671368 def test_unchroot (self ):
13681369 client = self ._get_nonchroot_client ()
1369- client .chroot = '/a'
1370- assert client .unchroot ('/a/b' ) == '/b'
1371- assert client .unchroot ('/b/c' ) == '/b/c'
1370+ client .chroot = "/a"
1371+ # Unchroot'ing the chroot path should return "/"
1372+ assert client .unchroot ("/a" ) == "/"
1373+ assert client .unchroot ("/a/b" ) == "/b"
1374+ assert client .unchroot ("/b/c" ) == "/b/c"
13721375
13731376
13741377class TestReconfig (KazooTestCase ):
0 commit comments