##// END OF EJS Templates
TEST: Also test deletion.
Scott Sanderson -
Show More
@@ -508,7 +508,7 b' class APITest(NotebookTestBase):'
508 self.assertIn('z.ipynb', nbnames)
508 self.assertIn('z.ipynb', nbnames)
509 self.assertNotIn('a.ipynb', nbnames)
509 self.assertNotIn('a.ipynb', nbnames)
510
510
511 def test_rename_preserves_checkpoints(self):
511 def test_checkpoints_follow_file(self):
512
512
513 # Read initial file state
513 # Read initial file state
514 orig = self.api.read('foo/a.ipynb')
514 orig = self.api.read('foo/a.ipynb')
@@ -533,8 +533,12 b' class APITest(NotebookTestBase):'
533
533
534 # Looking for checkpoints in the new location should work.
534 # Looking for checkpoints in the new location should work.
535 cps = self.api.get_checkpoints('foo/z.ipynb').json()
535 cps = self.api.get_checkpoints('foo/z.ipynb').json()
536 self.assertEqual(len(cps), 1)
536 self.assertEqual(cps, [cp1])
537 self.assertEqual(cps[0], cp1)
537
538 # Delete the file. The checkpoint should be deleted as well.
539 self.api.delete('foo/z.ipynb')
540 cps = self.api.get_checkpoints('foo/z.ipynb').json()
541 self.assertEqual(cps, [])
538
542
539 def test_rename_existing(self):
543 def test_rename_existing(self):
540 with assert_http_error(409):
544 with assert_http_error(409):
General Comments 0
You need to be logged in to leave comments. Login now