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

Fix IS-11 test_02_03_04 #849

Merged
merged 8 commits into from
Apr 27, 2024
Merged
23 changes: 12 additions & 11 deletions nmostesting/suites/IS1101Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from .. import Config as CONFIG
from ..IS04Utils import IS04Utils
from ..IS05Utils import IS05Utils
import requests
import datetime
from ..IS11Utils import IS11Utils

Expand Down Expand Up @@ -2104,7 +2103,7 @@ def test_02_03_04(self, test):
if len(inputs) == 0:
return test.UNCLEAR("No input supports changing the base EDID")
for input_id in inputs:
valid, response = TestHelper.do_request(
valid, response = self.do_request(
"GET", self.compat_url + "inputs/" + input_id + "/properties/"
)
if not valid:
Expand All @@ -2120,7 +2119,7 @@ def test_02_03_04(self, test):
return test.FAIL("Unable to find expected key: {}".format(e))
self.version[input_id] = version

valid, response = TestHelper.do_request(
valid, response = self.do_request(
"GET", self.node_url + "senders/" + sender_id
)
if not valid:
Expand All @@ -2136,14 +2135,16 @@ def test_02_03_04(self, test):
return test.FAIL("Unable to find expected key: {}".format(e))
self.version[sender_id] = version

response = requests.put(
self.compat_url + "inputs/" + input_id + "/edid/base/",
data=self.valid_edid,
headers={"Content-Type": "application/octet-stream"},
)
valid, response = self.do_request("PUT",
self.compat_url + "inputs/" + input_id + "/edid/base",
headers={"Content-Type": "application/octet-stream"},
data=self.valid_edid)
if not valid or response.status_code != 204:
return test.FAIL("Unexpected response from the Stream Compatibility Management API: {}"
.format(response))
time.sleep(CONFIG.STABLE_STATE_DELAY)

valid, response = TestHelper.do_request(
valid, response = self.do_request(
"GET", self.compat_url + "inputs/" + input_id + "/properties/"
)
if not valid:
Expand All @@ -2160,7 +2161,7 @@ def test_02_03_04(self, test):
if version == self.version[input_id]:
return test.FAIL("Version should change")

valid, response = TestHelper.do_request(
valid, response = self.do_request(
"GET", self.node_url + "senders/" + sender_id
)
if not valid:
Expand All @@ -2177,7 +2178,7 @@ def test_02_03_04(self, test):
if version == self.version[input_id]:
return test.FAIL("Version should change")

valid, response = TestHelper.do_request(
valid, response = self.do_request(
"DELETE", self.compat_url + "inputs/" + input_id + "/edid/base/"
)
if not valid:
Expand Down
Loading