From d136c12c3be5da1375d997ca70f6a52cbc3ec06d Mon Sep 17 00:00:00 2001 From: Kirit Thadaka Date: Tue, 5 Dec 2017 18:57:17 +0530 Subject: [PATCH] Added test for deleting non empty dirs --- notebook/services/contents/tests/test_contents_api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/notebook/services/contents/tests/test_contents_api.py b/notebook/services/contents/tests/test_contents_api.py index 60eadcae7..46402323c 100644 --- a/notebook/services/contents/tests/test_contents_api.py +++ b/notebook/services/contents/tests/test_contents_api.py @@ -522,6 +522,12 @@ class APITest(NotebookTestBase): listing = self.api.list('/').json()['content'] self.assertEqual(listing, []) + def test_delete_non_empty_dir(self): + # Test that non empty directory can be deleted + self.api.delete(u'å b') + # Assertion will pass only if self.api.delete does not throw and error + assert True + def test_rename(self): resp = self.api.rename('foo/a.ipynb', 'foo/z.ipynb') self.assertEqual(resp.headers['Location'].split('/')[-1], 'z.ipynb')