Skip to content

Commit

Permalink
Merge 73025bd into f2c914a
Browse files Browse the repository at this point in the history
  • Loading branch information
YufengXin committed May 15, 2024
2 parents f2c914a + 73025bd commit 9ea372a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
"pika >= 1.2.0",
"dataset",
"pymongo > 3.0",
"sdx-pce @ git+https://github.com/atlanticwave-sdx/pce@2.0.6.dev3",
"sdx-pce @ git+https://github.com/atlanticwave-sdx/pce@2.0.6.rc0",
]

[project.optional-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion sdx_controller/handlers/connection_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ def place_connection(
return "Could not solve the request", 400

try:
breakdown = te_manager.generate_connection_breakdown(solution)
breakdown = te_manager.generate_connection_breakdown(
solution, connection_request
)
status, code = self._send_breakdown_to_lc(breakdown, connection_request)
logger.debug(f"Breakdown status: {status}, code: {code}")
return status, code
Expand Down
5 changes: 4 additions & 1 deletion sdx_controller/test/test_connection_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ def test_z100_getconnection_by_id_success(self):
f"{BASE_PATH}/connection/{connection_id}",
method="GET",
)
self.assertStatus(response, 200)
print(f"Response body is : {response.data.decode('utf-8')}")
self.assertStatus(response, 404)

@patch("sdx_controller.utils.db_utils.DbUtils.get_all_entries_in_collection")
def test_z105_getconnections_fail(self, mock_get_all_entries):
Expand All @@ -281,6 +282,8 @@ def test_z105_getconnections_success(self):
f"{BASE_PATH}/connections",
method="GET",
)

print(f"Response body is : {response.data.decode('utf-8')}")
self.assertStatus(response, 200)

assert len(response.json) == 1
Expand Down

0 comments on commit 9ea372a

Please sign in to comment.