Skip to content

Commit 55b251c

Browse files
authored
Merge pull request #51 from FZJ-INM1-BDA/hotfix_connectivityColNames
hotfix: connectivity column names
2 parents e7aab2d + fd341db commit 55b251c

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

app/service/request_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def get_regional_feature(
278278
"kgId": conn_pr._matrix.id,
279279
},
280280
'get_detail': lambda conn_pr: {
281-
# "__column_names": conn_pr.column_names, TODO: where to get the names?
281+
"__column_names": list(conn_pr.regionnames), #TODO: where to get the names?
282282
"__profile": conn_pr.profile.tolist(),
283283
},
284284
'instance': conn_pr,

test/core/test_parcellation_api.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,19 @@ def test_no_result_ieeg(self):
207207
assert response.status_code == 200
208208
# hoc1 left should have no ieeg result
209209
assert len(result_content) == 0
210+
211+
def test_rest_connectivity(self):
212+
conn_id='e428cb6b-0110-4205-94ac-533ca5de6bb5'
213+
url='/v1_0/atlases/{atlas_id}/parcellations/{parcellation_id}/regions/{region_spec}/features/ConnectivityProfile/{conn_id}'.format(
214+
atlas_id=quote_plus(ATLAS_ID),
215+
parcellation_id=PARCELLATION_ID,
216+
region_spec=quote_plus(HOC1_LEFT_REGION_NAME),
217+
conn_id=conn_id
218+
)
219+
response=client.get(url)
220+
assert response.status_code == 200
221+
response_json=json.loads(response.content)
222+
column_names=response_json.get('__column_names')
223+
assert column_names is not None
224+
assert type(column_names) == list
225+
assert len(column_names) > 0

0 commit comments

Comments
 (0)