##// END OF EJS Templates
TEST: Expect a 404 on delete of non-existent file.
Scott Sanderson -
Show More
@@ -308,6 +308,9 b' class TestContentsManager(TestCase):'
308 # Delete the notebook
308 # Delete the notebook
309 cm.delete(path)
309 cm.delete(path)
310
310
311 # Check that deleting a non-existent path raises an error.
312 self.assertRaises(HTTPError, cm.delete, path)
313
311 # Check that a 'get' on the deleted notebook raises and error
314 # Check that a 'get' on the deleted notebook raises and error
312 self.assertRaises(HTTPError, cm.get, path)
315 self.assertRaises(HTTPError, cm.get, path)
313
316
@@ -317,8 +320,8 b' class TestContentsManager(TestCase):'
317 name = u'nb √.ipynb'
320 name = u'nb √.ipynb'
318 path = u'{0}/{1}'.format(parent, name)
321 path = u'{0}/{1}'.format(parent, name)
319 self.make_dir(parent)
322 self.make_dir(parent)
320 orig = cm.new(path=path)
321
323
324 orig = cm.new(path=path)
322 # copy with unspecified name
325 # copy with unspecified name
323 copy = cm.copy(path)
326 copy = cm.copy(path)
324 self.assertEqual(copy['name'], orig['name'].replace('.ipynb', '-Copy1.ipynb'))
327 self.assertEqual(copy['name'], orig['name'].replace('.ipynb', '-Copy1.ipynb'))
General Comments 0
You need to be logged in to leave comments. Login now