示例#1
0
    def test_get_description(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):

        for i in range(self.num_components):
            description = component.get_description(platform_api_conn, i)
            if self.expect(description is not None, "Component {}: Failed to retrieve description".format(i)):
                self.expect(isinstance(description, STRING_TYPE), "Component {}: Description appears to be incorrect".format(i))
        self.assert_expectations()
示例#2
0
    def test_get_description(self, duthost, localhost, platform_api_conn):
        if self.num_components == 0:
            pytest.skip("No components found on device")

        for i in range(self.num_components):
            description = component.get_description(platform_api_conn, i)
            if self.expect(description is not None, "Component {}: Failed to retrieve description".format(i)):
                self.expect(isinstance(description, STRING_TYPE), "Component {}: Description appears to be incorrect".format(i))
        self.assert_expectations()