Skip to content

Commit

Permalink
Refactor notebook creation API endpoint and model in test_notebook_se…
Browse files Browse the repository at this point in the history
…rvice.py, and fix test_create_and_get_notebook test case
  • Loading branch information
xuwenyihust committed Jul 4, 2024
1 parent ce69ec7 commit 839d5f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/tests/services/test_notebook_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ def test_create_and_get_notebook(self):
with self.app.app_context():
Notebook.create_notebook_with_init_cells(notebook_name='Notebook.ipynb', notebook_path='')

notebooks = Notebook.get_notebook_by_path(notebook_path='work/Notebook.ipynb')[0]
notebooks = json.loads(Notebook.get_notebook_by_path(notebook_path='work/Notebook.ipynb')[0])
status_code = Notebook.get_notebook_by_path(notebook_path='work/Notebook.ipynb')[1]

print(notebooks)

self.assertEqual(status_code, 200)
self.assertEqual(len(notebooks), 1)
self.assertEqual(notebooks['name'], 'Notebook.ipynb')
Expand Down

0 comments on commit 839d5f8

Please sign in to comment.