Exemple #1
0
    def test_get_status(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):
            status = module.get_status(platform_api_conn, i)
            pytest_assert(status is not None,
                          "Module {}: Unable to retrieve status".format(i))
            pytest_assert(isinstance(status, bool),
                          "Module {}: Status appears incorrect".format(i))
Exemple #2
0
    def test_get_status(self, duthosts, enum_rand_one_per_hwsku_hostname,
                        localhost, platform_api_conn):

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