From 23e5e6da4f4c26c3ca61d78aab2c6416d635e11e Mon Sep 17 00:00:00 2001 From: Scott Sanderson <scoutoss@gmail.com> Date: Mon, 15 Dec 2014 00:10:55 -0500 Subject: [PATCH] TEST: Expect a 404 on delete of non-existent file. --- IPython/html/services/contents/tests/test_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IPython/html/services/contents/tests/test_manager.py b/IPython/html/services/contents/tests/test_manager.py index 45f6f4f51..f0ac5962f 100644 --- a/IPython/html/services/contents/tests/test_manager.py +++ b/IPython/html/services/contents/tests/test_manager.py @@ -308,6 +308,9 @@ class TestContentsManager(TestCase): # Delete the notebook cm.delete(path) + # Check that deleting a non-existent path raises an error. + self.assertRaises(HTTPError, cm.delete, path) + # Check that a 'get' on the deleted notebook raises and error self.assertRaises(HTTPError, cm.get, path) @@ -317,8 +320,8 @@ class TestContentsManager(TestCase): name = u'nb √.ipynb' path = u'{0}/{1}'.format(parent, name) self.make_dir(parent) - orig = cm.new(path=path) + orig = cm.new(path=path) # copy with unspecified name copy = cm.copy(path) self.assertEqual(copy['name'], orig['name'].replace('.ipynb', '-Copy1.ipynb'))