Ejemplo n.º 1
0
    def test_get_serial(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):

        for i in range(self.num_components):
            serial = component.get_serial(platform_api_conn, i)
            if self.expect(serial is not None, "Component {}: Unable to retrieve serial number".format(i)):
                self.expect(isinstance(serial, STRING_TYPE), "Component {}: Serial number appears incorrect".format(i))
        self.assert_expectations()
Ejemplo n.º 2
0
    def test_get_serial(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):
            serial = component.get_serial(platform_api_conn, i)
            if self.expect(serial is not None, "Component {}: Unable to retrieve serial number".format(i)):
                self.expect(isinstance(serial, STRING_TYPE), "Component {}: Serial number appears incorrect".format(i))
        self.assert_expectations()