コード例 #1
0
ファイル: test_thermal.py プロジェクト: dinesh0692/sonic-mgmt
    def test_get_name(self, duthost, localhost, platform_api_conn):
        for i in range(self.num_thermals):
            name = thermal.get_name(platform_api_conn, i)

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

        self.assert_expectations()
コード例 #2
0
    def test_get_name(self, duthost, localhost, platform_api_conn):
        for i in range(self.num_thermals):
            name = thermal.get_name(platform_api_conn, i)

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

        self.assert_expectations()