コード例 #1
0
ファイル: test_sfp.py プロジェクト: sandycelestica/sonic-mgmt
 def test_get_status(self, duthost, localhost, platform_api_conn):
     for i in range(self.num_sfps):
         status = sfp.get_status(platform_api_conn, i)
         if self.expect(
                 status is not None,
                 "Unable to retrieve transceiver {} status".format(i)):
             self.expect(
                 isinstance(status, bool),
                 "Transceiver {} status appears incorrect".format(i))
     self.assert_expectations()
コード例 #2
0
ファイル: test_sfp.py プロジェクト: pra-moh/sonic-mgmt
 def test_get_status(self, duthosts, enum_rand_one_per_hwsku_hostname,
                     localhost, platform_api_conn):
     for i in self.candidate_sfp:
         status = sfp.get_status(platform_api_conn, i)
         if self.expect(
                 status is not None,
                 "Unable to retrieve transceiver {} status".format(i)):
             self.expect(
                 isinstance(status, bool),
                 "Transceiver {} status appears incorrect".format(i))
     self.assert_expectations()