예제 #1
0
    def test_get_name(self, duthost, localhost, platform_api_conn):
        for i in range(self.num_fans):
            name = fan.get_name(platform_api_conn, i)

            if self.expect(name is not None, "Unable to retrieve Fan {} name".format(i)):
                self.expect(isinstance(name, STRING_TYPE), "Fan {} name appears incorrect".format(i))

        self.assert_expectations()
예제 #2
0
    def test_get_name(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):
        duthost = duthosts[enum_rand_one_per_hwsku_hostname]
        for i in range(self.num_fans):
            name = fan.get_name(platform_api_conn, i)

            if self.expect(name is not None, "Unable to retrieve Fan {} name".format(i)):
                self.expect(isinstance(name, STRING_TYPE), "Fan {} name appears incorrect".format(i))
                self.compare_value_with_platform_facts(duthost, 'name', name, i)

        self.assert_expectations()