Skip to content

Commit 6ca729c

Browse files
committed
for debug
1 parent 7f3fa8e commit 6ca729c

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

tests/commands/test_split_subset.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,21 @@ def test_split_by_group_names(self):
147147
]
148148
}
149149

150-
responses.replace(
151-
responses.POST,
152-
"{base_url}/intake/organizations/{organization}/workspaces/{workspace}/subset/{subset_id}/split-by-groups".format(
153-
base_url=get_base_url(),
154-
organization=self.organization,
155-
workspace=self.workspace,
156-
subset_id=self.subsetting_id,
157-
),
158-
json=mock_json_response,
159-
status=200
160-
)
150+
def replace_response():
151+
responses.replace(
152+
responses.POST,
153+
"{base_url}/intake/organizations/{organization}/workspaces/{workspace}/subset/{subset_id}/split-by-groups".format(
154+
base_url=get_base_url(),
155+
organization=self.organization,
156+
workspace=self.workspace,
157+
subset_id=self.subsetting_id,
158+
),
159+
json=mock_json_response,
160+
status=200
161+
)
161162

162163
with tempfile.TemporaryDirectory() as tmpdir:
164+
replace_response()
163165
result = self.cli("split-subset", "--subset-id", "subset/{}".format(self.subsetting_id),
164166
"--split-by-groups", "--split-by-groups-output-dir", tmpdir, "file")
165167

@@ -179,7 +181,7 @@ def test_split_by_group_names(self):
179181

180182
# with rest option
181183
with tempfile.TemporaryDirectory() as tmpdir:
182-
184+
replace_response()
183185
result = self.cli("split-subset", "--subset-id", "subset/{}".format(self.subsetting_id),
184186
"--split-by-groups-with-rest", "--split-by-groups-output-dir", tmpdir, "file", mix_stderr=False)
185187

0 commit comments

Comments
 (0)