Example #1
0
    def test_get_model(self, duthost, localhost, platform_api_conn):
        if self.num_modules == 0:
            pytest.skip("No modules found on device")

        for i in range(self.num_modules):
            model = module.get_model(platform_api_conn, i)
            pytest_assert(model is not None,
                          "Module {}: Unable to retrieve model".format(i))
            pytest_assert(isinstance(model, str),
                          "Module {}: Model appears incorrect".format(i))
Example #2
0
    def test_get_model(self, duthosts, enum_rand_one_per_hwsku_hostname,
                       localhost, platform_api_conn):

        for i in range(self.num_modules):
            model = module.get_model(platform_api_conn, i)
            if self.expect(model is not None,
                           "Unable to retrieve module {} model".format(i)):
                self.expect(isinstance(model, STRING_TYPE),
                            "Module {} model appears incorrect".format(i))
        self.assert_expectations()
Example #3
0
    def test_get_model(self, duthost, localhost, platform_api_conn):
        if self.num_modules == 0:
            pytest.skip("No modules found on device")

        for i in range(self.num_modules):
            model = module.get_model(platform_api_conn, i)
            if self.expect(model is not None,
                           "Unable to retrieve module {} model".format(i)):
                self.expect(isinstance(model, STRING_TYPE),
                            "Module {} model appears incorrect".format(i))
        self.assert_expectations()