Skip to content

Commit aa5fd16

Browse files
committed
Add tests
1 parent c9228eb commit aa5fd16

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test_target_list.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""
2+
Tests for helper function for getting a list of targets.
3+
"""
4+
5+
import io
6+
7+
from vws import VWS
8+
9+
10+
class TestListTargets:
11+
"""
12+
Test for listing targets.
13+
"""
14+
15+
def test_list_targets(
16+
self,
17+
client: VWS,
18+
high_quality_image: io.BytesIO,
19+
) -> None:
20+
"""
21+
It is possible to get a list of target IDs.
22+
"""
23+
id_1 = client.add_target(name='x', width=1, image=high_quality_image)
24+
id_2 = client.add_target(name='a', width=1, image=high_quality_image)
25+
assert sorted(client.list_targets()) == sorted([id_1, id_2])

0 commit comments

Comments
 (0)