Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IS-11] Make test cases independent #836

Merged
merged 22 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bc7e997
python-zeroconf 0.75.0 strict=False for _nmos-registration._tcp
garethsb Aug 14, 2023
b10ff71
Python 3.6 (and 3.7!) is End-Of-Life, and so is Node.js 14.x
garethsb Aug 18, 2023
16157f5
Merge pull request #829 from AMWA-TV/zeroconf-strict-false
garethsb Aug 21, 2023
3f10a8d
Pass IP address of API under test to testssl.sh
garethsb Oct 5, 2023
796a115
Add MOCK_SERVICES_WARM_UP_DELAY
garethsb Oct 5, 2023
43a1f76
Delay running tests until after MOCK_SERVICES_WARM_UP_DELAY
garethsb Oct 5, 2023
215f736
Tweak message
garethsb Oct 5, 2023
ad0e39d
Merge pull request #832 from AMWA-TV/testssl-sh-ip
garethsb Oct 5, 2023
ebd4787
Merge pull request #833 from AMWA-TV/mocks-warm-up
garethsb Oct 5, 2023
d569132
Rewrite tests of Inputs in the independent manner
N-Nagorny Oct 11, 2023
4b9debb
Add missed default Effective EDID get
N-Nagorny Oct 12, 2023
d3bb288
Rewrite tests of Outputs in the independent manner
N-Nagorny Oct 12, 2023
e994801
Return the valid and the invalid EDID examples to the filesystem
N-Nagorny Oct 26, 2023
cf451f0
Clean IS-11 helper functions
N-Nagorny Oct 26, 2023
5a64c55
Turn back the top-level sectioning
N-Nagorny Oct 31, 2023
1f83676
Insert waits between modifying Base EDID and GETting Effective EDID
N-Nagorny Oct 31, 2023
bfbd5df
Add "adjust_to_caps" into test 06.04
N-Nagorny Nov 1, 2023
404c863
Merge branch 'master' into is-11
N-Nagorny Nov 1, 2023
d52c5f3
Merge branch 'master' into is-11-independent-test-cases
N-Nagorny Nov 1, 2023
d783ba2
Add tear_down_tests
N-Nagorny Nov 1, 2023
bf3999c
Merge remote-tracking branch 'upstream/is-11' into is-11
N-Nagorny Nov 2, 2023
11dba23
Merge branch 'is-11' into is-11-independent-test-cases
N-Nagorny Nov 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 4 additions & 28 deletions nmostesting/IS11Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,60 +12,36 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from enum import Enum

from . import TestHelper
from .NMOSUtils import NMOSUtils

SND_RCV_SUBSET = Enum('SndRcvSubset', ['ALL', 'WITH_I_O', 'WITHOUT_I_O'])


class IS11Utils(NMOSUtils):
def __init__(self, url):
NMOSUtils.__init__(self, url)

# TODO: Remove the duplication (IS05Utils)
def get_senders(self, filter=SND_RCV_SUBSET.ALL):
def get_senders(self):
"""Gets a list of the available senders on the API"""
toReturn = []
valid, r = TestHelper.do_request("GET", self.url + "senders/")
if valid and r.status_code == 200:
try:
for value in r.json():
if filter == SND_RCV_SUBSET.ALL:
toReturn.append(value[:-1])
else:
valid_io, r_io = TestHelper.do_request("GET", self.url + "senders/" + value + "inputs/")
if valid_io and r_io.status_code == 200:
try:
if len(r_io.json()) > 0 and filter == SND_RCV_SUBSET.WITH_I_O or \
len(r_io.json()) == 0 and filter == SND_RCV_SUBSET.WITHOUT_I_O:
toReturn.append(value[:-1])
except ValueError:
pass
toReturn.append(value[:-1])
except ValueError:
pass
return toReturn

# TODO: Remove the duplication (IS05Utils)
def get_receivers(self, filter=SND_RCV_SUBSET.ALL):
def get_receivers(self):
"""Gets a list of the available receivers on the API"""
toReturn = []
valid, r = TestHelper.do_request("GET", self.url + "receivers/")
if valid and r.status_code == 200:
try:
for value in r.json():
if filter == SND_RCV_SUBSET.ALL:
toReturn.append(value[:-1])
else:
valid_io, r_io = TestHelper.do_request("GET", self.url + "receivers/" + value + "outputs/")
if valid_io and r_io.status_code == 200:
try:
if len(r_io.json()) > 0 and filter == SND_RCV_SUBSET.WITH_I_O or \
len(r_io.json()) == 0 and filter == SND_RCV_SUBSET.WITHOUT_I_O:
toReturn.append(value[:-1])
except ValueError:
pass
toReturn.append(value[:-1])
except ValueError:
pass
return toReturn
Expand Down
Loading
Loading