Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Dec 3, 2024
1 parent 2e6ce0f commit 6c26f64
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,25 @@ def test_get_leaves(self, myclient):
root_id, bounds=bounds, stop_layer=2
)
assert np.all(svids == svids_ret)

@responses.activate

def test_get_leaves_many(self, myclient):
endpoint_mapping = self._default_endpoint_map
root_ids = [864691135217871271, 864691135217871272]
url = chunkedgraph_endpoints_v1["leaves_many"].format_map(endpoint_mapping)

sv_dict = {864691135217871271: [97557743795364048, 75089979126506763],
864691135217871272: [97557743795364049, 750899791265067632]}
svids = np.array(svlist, dtype=np.int64)

data = {"node_ids": root_ids}
responses.add(responses.GET, json=sv_dict, url=url,match=[json_params_matcher(data)])

svids_ret = myclient.chunkedgraph.get_leaves(root_ids)
for k,v in svids_ret.items():
assert np.all(v == sv_dict[k])


@responses.activate
def test_get_root(self, myclient):
Expand Down

0 comments on commit 6c26f64

Please sign in to comment.