Skip to content

Commit

Permalink
fix(api): pytest for restore
Browse files Browse the repository at this point in the history
  • Loading branch information
berdal84 committed May 16, 2024
1 parent 374ab21 commit db74dbb
Show file tree
Hide file tree
Showing 2 changed files with 689 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def test_backup():
backup_tmp.write(backup.model_dump_json(indent=1))

def test_restore():
backup_file = open("./test_main_backup_tmp.json", "r")
backup_content = backup_file.read()
response = client.post('/db/restore/v1', content=backup_content)
files = {'file': open("./test_main_backup_tmp.json", "rb")}
response = client.post('/db/restore/v1', files=files)
LOGGER.debug(response.text)
assert response.status_code == 200
Loading

0 comments on commit db74dbb

Please sign in to comment.