Skip to content

Commit a850810

Browse files
zmej-serowwillmcgugan
authored andcommitted
Test for geturl() method (#290)
1 parent 50a1942 commit a850810

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_ftpfs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ def tearDown(self):
167167

168168
def test_ftp_url(self):
169169
self.assertTrue(self.fs.ftp_url.startswith("ftp://127.0.0.1"))
170+
171+
def test_geturl(self):
172+
self.fs.makedir("foo")
173+
self.fs.create("bar")
174+
self.fs.create("foo/bar")
175+
self.assertTrue(self.fs.geturl('foo') == "ftp://127.0.0.1:{}/foo".format(self.server.port))
176+
self.assertTrue(self.fs.geturl('bar') == "ftp://127.0.0.1:{}/bar".format(self.server.port))
177+
self.assertTrue(self.fs.geturl('foo/bar') == "ftp://127.0.0.1:{}/foo/bar".format(self.server.port))
170178

171179
def test_host(self):
172180
self.assertEqual(self.fs.host, self.server.host)

0 commit comments

Comments
 (0)