Skip to content

Commit 21596a1

Browse files
committed
Fix: Recordings tests
- Add new `manual` test marker - Mark Recordings tests as manual We cannot create recordings programmatically, so we cannot automate testing of the Recordings API - we can only manually test the API after manually creating recordings.
1 parent d262618 commit 21596a1

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
addopts = --strict-markers
33
markers =
44
slow: marks tests as slow (deselect with '-m "not slow"')
5+
manual: marks tests as manual (deselect with '-m "not manual"')

script/test

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ default=true
1010

1111

1212
# Process Script Arguments
13-
for i in ${@}; do
13+
for i in "${@}"; do
1414
case ${i} in
1515
lint)
1616
lint=true
@@ -27,6 +27,11 @@ for i in ${@}; do
2727
default=
2828
;;
2929

30+
manual)
31+
slow=true
32+
default=
33+
;;
34+
3035
*)
3136
echo "Unknown argument: $i"
3237
exit 1
@@ -47,12 +52,18 @@ fi
4752

4853
# Run the test suite
4954
if [ ${default} ] || [ ${tests} ]; then
50-
echo "==> Running the test suite (excluding slow tests)"
51-
py.test -s -m "not slow"
55+
echo "==> Running the test suite (excluding slow and manual tests)"
56+
py.test -s -m "not slow not manual"
5257
fi
5358

54-
# Run the rate-limit tests
59+
# Run the slow tests
5560
if [ ${slow} ]; then
5661
echo "==> Running the slow tests"
5762
py.test -s -m "slow"
5863
fi
64+
65+
# Run the slow tests
66+
if [ ${manual} ]; then
67+
echo "==> Running the manual tests"
68+
py.test -s -m "manual"
69+
fi

tests/api/test_recordings.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,22 @@ def recording_id(api, list_recordings):
6262

6363

6464
# Tests
65+
# We cannot create recordings programmatically, so we cannot automate testing
66+
# of the Recordings API - we can only manually test the API after manually
67+
# creating recordings.
68+
69+
70+
@pytest.mark.manual
6571
def test_recording_list(list_recordings):
6672
assert len(list_recordings) > 0
6773
assert are_valid_recording(list_recordings)
6874

6975

76+
@pytest.mark.manual
7077
def test_recording_detail(recording_id):
7178
assert is_valid_recording(recording_id)
7279

7380

81+
@pytest.mark.manual
7482
def test_delete_recording(api, recording_id):
7583
api.recordings.delete(recording_id)

0 commit comments

Comments
 (0)