Skip to content

Commit

Permalink
fix: fixing integrations tests
Browse files Browse the repository at this point in the history
  • Loading branch information
david-montano-metalab committed Sep 10, 2024
1 parent 0ee6fb7 commit 2fa66dd
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/apps/integrations/tests/test_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ class TestIntegrationRouter(BaseTest):
]
enable_integration_url = integration_router.url_path_for("enable_integration")
disable_integration_url = integration_router.url_path_for("disable_integration")
create_integration_url = integration_router.url_path_for("/")

async def test_enable_integration(
self,
client: TestClient,
tom: User,
):
integration_data = [
{"integrationType": "LORIS"},
{
"applet_id":"8fb291b2-5ecf-4f21-ada8-04ca48451660",
"integration_type":"LORIS",
"configuration":{
"hostname":"https://loris.cmiml.net",
"username":"lorisfrontadmin",
"password":"password",
"project":"loris_project"
}
}
]
client.login(tom)
response = await client.post(self.enable_integration_url, data=integration_data)
Expand Down Expand Up @@ -61,7 +69,7 @@ async def test_create_integration(
create_loris_integration_url_data = [
{
"applet_id":"8fb291b2-5ecf-4f21-ada8-04ca48451660",
"integrationType":"LORIS",
"integration_type":"LORIS",
"configuration":{
"hostname":"https://loris.cmiml.net",
"username":"lorisfrontadmin",
Expand All @@ -71,5 +79,5 @@ async def test_create_integration(
}
]
client.login(tom)
response = await client.post(self.create_integration_url, data=create_loris_integration_url_data)
response = await client.post("integrations", data=create_loris_integration_url_data)
assert response.status_code == 201

0 comments on commit 2fa66dd

Please sign in to comment.