diff --git a/nmostesting/suites/IS1201Test.py b/nmostesting/suites/IS1201Test.py index 6fd700e7..7c7b0265 100644 --- a/nmostesting/suites/IS1201Test.py +++ b/nmostesting/suites/IS1201Test.py @@ -601,8 +601,6 @@ def generate_device_model_datatype_schemas(self, test): def check_device_model(self, test): if not self.device_model_metadata["checked"]: - self.device_model_metadata["checked"] = True - self.create_ncp_socket(test) class_manager = self.get_class_manager(test) device_model = self.query_device_model(test) @@ -613,6 +611,7 @@ def check_device_model(self, test): device_model, class_manager.class_descriptors) + self.device_model_metadata["checked"] = True return def nc_object_factory(self, test, class_id, oid, role): @@ -664,6 +663,9 @@ def test_05(self, test): if self.device_model_metadata["error"]: return test.FAIL(self.device_model_metadata["error_msg"]) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + return test.PASS() def test_06(self, test): @@ -674,7 +676,7 @@ def test_06(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.unique_roles_error: return test.FAIL("Roles must be unique. ", @@ -682,6 +684,9 @@ def test_06(self, test): "/docs/NcObject.html" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + return test.PASS() def test_07(self, test): @@ -692,7 +697,7 @@ def test_07(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.unique_oids_error: return test.FAIL("Oids must be unique. ", @@ -700,6 +705,9 @@ def test_07(self, test): "/docs/NcObject.html" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + return test.PASS() def test_08(self, test): @@ -713,7 +721,7 @@ def test_08(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.organization_metadata["error"]: return test.FAIL(self.organization_metadata["error_msg"], @@ -721,6 +729,9 @@ def test_08(self, test): "/docs/Framework.html#ncclassid" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + if not self.organization_metadata["checked"]: return test.UNCLEAR("No non-standard classes found.") @@ -737,7 +748,7 @@ def test_09(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.touchpoints_metadata["error"]: return test.FAIL(self.touchpoints_metadata["error_msg"], @@ -745,6 +756,9 @@ def test_09(self, test): "/docs/NcObject.html#touchpoints" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + if not self.touchpoints_metadata["checked"]: return test.UNCLEAR("No Touchpoints found.") return test.PASS() @@ -758,7 +772,7 @@ def test_09_01(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.deprecated_property_metadata["error"]: return test.FAIL(self.deprecated_property_metadata["error_msg"], @@ -766,6 +780,9 @@ def test_09_01(self, test): "/docs/Framework.html#ncmethodstatus" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + if not self.deprecated_property_metadata["checked"]: return test.UNCLEAR("No deprecated properties found.") return test.PASS() @@ -779,7 +796,7 @@ def test_10(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.managers_members_root_block_error: return test.FAIL("Managers must be members of Root Block. ", @@ -787,6 +804,9 @@ def test_10(self, test): "/docs/Managers.html" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + return test.PASS() def test_11(self, test): @@ -798,7 +818,7 @@ def test_11(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.managers_are_singletons_error: return test.FAIL("Managers must be singleton classes. ", @@ -806,6 +826,9 @@ def test_11(self, test): "/docs/Managers.html" .format(self.apis[MS05_API_KEY]["spec_branch"])) + if not self.device_model_metadata["checked"]: + return test.UNCLEAR("Unable to check Device Model.") + return test.PASS() def test_12(self, test): @@ -952,7 +975,7 @@ def test_17(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.get_sequence_item_metadata["error"]: return test.FAIL(self.get_sequence_item_metadata["error_msg"]) @@ -972,7 +995,7 @@ def test_18(self, test): self.check_device_model(test) except NMOSTestException as e: # Couldn't validate model so can't perform test - return test.UNCLEAR(e.args[0].detail, e.args[0].link) + return test.FAIL(e.args[0].detail, e.args[0].link) if self.get_sequence_length_metadata["error"]: return test.FAIL(self.get_sequence_length_metadata["error_msg"])