Skip to content

Commit 8d1d017

Browse files
rllinrllin
authored andcommitted
update labeling frontend test to work with any project even if it has more than the default editors
1 parent d2a0909 commit 8d1d017

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/integration/test_labeling_frontend.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
def test_get_labeling_frontends(client):
55
frontends = list(client.get_labeling_frontends())
6-
assert len(frontends) == 1, frontends
6+
assert len(frontends) >= 1, (
7+
'Projects should have at least one frontend by default.')
78

89
# Test filtering
9-
single = list(
10-
client.get_labeling_frontends(where=LabelingFrontend.iframe_url_path ==
11-
frontends[0].iframe_url_path))
12-
assert len(single) == 1, single
10+
target_frontend = frontends[0]
11+
filtered_frontends = client.get_labeling_frontends(
12+
where=LabelingFrontend.iframe_url_path == target_frontend.iframe_url_path)
13+
for frontend in filtered_frontends:
14+
assert target_frontend == frontend
1315

1416

1517
def test_labeling_frontend_connecting_to_project(project):

0 commit comments

Comments
 (0)