From b82b4997e79d85d1e96448ca047b3a13e395e42b Mon Sep 17 00:00:00 2001 From: MinRK Date: Mon, 25 Nov 2013 23:20:23 -0800 Subject: [PATCH] test that rename fails with 409 if it would clobber (test already passes, but it should still be tested) closes #4600 --- IPython/html/services/notebooks/tests/test_notebooks_api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IPython/html/services/notebooks/tests/test_notebooks_api.py b/IPython/html/services/notebooks/tests/test_notebooks_api.py index ceee22c48..4e6e04de2 100644 --- a/IPython/html/services/notebooks/tests/test_notebooks_api.py +++ b/IPython/html/services/notebooks/tests/test_notebooks_api.py @@ -245,6 +245,10 @@ class APITest(NotebookTestBase): self.assertIn('z.ipynb', nbnames) self.assertNotIn('a.ipynb', nbnames) + def test_rename_existing(self): + with assert_http_error(409): + self.nb_api.rename('a.ipynb', 'foo', 'b.ipynb') + def test_save(self): resp = self.nb_api.read('a.ipynb', 'foo') nbcontent = json.loads(resp.text)['content']