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