Skip to content

Commit

Permalink
Refactor notebook creation API endpoint and model to use 'name' and '…
Browse files Browse the repository at this point in the history
…path' instead of 'notebookName' in test_notebook_service.py
  • Loading branch information
xuwenyihust committed Jul 3, 2024
1 parent b7c5ecf commit 00d4b1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/tests/services/test_notebook_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def test_get_all_notebooks(self):

def test_get_notebook_by_path(self):
with self.app.app_context():
Notebook.create_notebook_with_init_cells(notebook_name='Notebook', notebook_path='path_to_notebook')
Notebook.create_notebook_with_init_cells(notebook_name='Notebook.ipynb', notebook_path='path_to_notebook')

notebooks = json.loads(Notebook.get_notebook_by_path(notebook_path='path_to_notebook'))
notebooks = json.loads(Notebook.get_notebook_by_path(notebook_path='path_to_notebook/Notebook.ipynb'))
self.assertEqual(len(notebooks), 1)
self.assertEqual(notebooks['name'], 'Notebook')
self.assertEqual(notebooks['name'], 'Notebook.ipynb')
self.assertEqual(notebooks['path'], 'path_to_notebook')

0 comments on commit 00d4b1a

Please sign in to comment.