Skip to content
Snippets Groups Projects

Fixed the bug

1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -281,9 +281,9 @@ class AppIntegrationTest(unittest.TestCase):
dashboard = self.dashboard_client().find(req.dashboard_uid)['dashboard']
self.assertEqual([], dashboard['tags'])
def test_update_dashboard_not_found_fails(self):
def test_update_dashboard_not_found_created_succeeds(self):
with app.test_client() as test_client:
headers = {'Authorization': f'Bearer {self.token(["system"])}', 'Content-Type': 'application/json'}
# test
response = test_client.put(f"/api/dashboard/idonotexist", headers=headers, json=req.model_dump())
self.assertEqual(404, response.status_code)
response = test_client.put(f"/api/dashboard/{req.dashboard_uid}", headers=headers, json=req.model_dump())
self.assertEqual(200, response.status_code)
Loading