Example #1
0
    def test_get_name(self, duthost, localhost, platform_api_conn):
        for i in range(self.num_fan_drawers):
            name = fan_drawer.get_name(platform_api_conn, i)

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

        self.assert_expectations()
Example #2
0
    def test_get_name(self, duthost, localhost, platform_api_conn):
        for i in range(self.num_fan_drawers):
            name = fan_drawer.get_name(platform_api_conn, i)

            if self.expect(name is not None,
                           "Unable to retrieve Fan_drawer {} name".format(i)):
                self.expect(isinstance(name, STRING_TYPE),
                            "Fan_drawer {} name appears incorrect".format(i))
                if self.fan_drawer_truth:
                    self.expect(
                        name == self.fan_drawer_truth[i]['name'],
                        "Fan_drawer {} name does not match, expected name {}".
                        format(i, self.fan_drawer_truth[i]['name']))

        self.assert_expectations()