Skip to content

Commit 74fe141

Browse files
authored
Assert fs.upload raises ResourceNotFound
1 parent 22f19e3 commit 74fe141

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,10 @@ def test_upload(self):
14941494
with self.fs.open("foo", "rb") as f:
14951495
data = f.read()
14961496
self.assertEqual(data, b"bar")
1497+
1498+
# upload to non-existing path (/foo/bar)
1499+
with self.assertRaises(errors.ResourceNotFound):
1500+
self.fs.upload("/foo/bar/baz", bytes_file)
14971501

14981502
def test_upload_chunk_size(self):
14991503
test_data = b"bar" * 128

0 commit comments

Comments
 (0)