response = client.post("/featureGroup", json={})
assert response.status_code == 400
expected = ProblemDetails(400, "Bad Request", "some DB error").to_dict()
+ assert response.get_json() == expected
+
+ @patch('trainingmgr.schemas.featuregroup_schema.FeatureGroupSchema.load', side_effect=Exception("unexpected fail"))
+ def test_generic_exception(self, mock_load, client):
+ response = client.post("/featureGroup", json={})
+ assert response.status_code == 500
+ expected = ProblemDetails(500, "Internal Server Error", "unexpected fail").to_dict()
assert response.get_json() == expected
\ No newline at end of file