def test_20_rdm_device_disconnected(self):
     response = test_utils_rfc8040.check_device_connection("ROADMA01")
     self.assertEqual(response['status_code'], requests.codes.conflict)
     self.assertIn(response['connection-status']['error-type'], ('protocol', 'application'))
     self.assertEqual(response['connection-status']['error-tag'], 'data-missing')
     self.assertEqual(response['connection-status']['error-message'],
                      'Request could not be completed because the relevant data model content does not exist')
示例#2
0
    def test_01_connect_SPDR_SA1(self):
        response = test_utils_rfc8040.mount_device("SPDR-SA1", ('spdra', self.NODE_VERSION))
        self.assertEqual(response.status_code, requests.codes.created, test_utils_rfc8040.CODE_SHOULD_BE_201)
        time.sleep(10)

        response = test_utils_rfc8040.check_device_connection("SPDR-SA1")
        self.assertEqual(response['status_code'], requests.codes.ok)
        self.assertEqual(response['connection-status'], 'connected')
示例#3
0
 def test_02_rdm_device_connected(self):
     response = test_utils_rfc8040.check_device_connection("ROADM-D1")
     self.assertEqual(response['status_code'], requests.codes.ok)
     self.assertEqual(response['connection-status'], 'connected')
     time.sleep(10)
 def test_02_xpdr_device_connected(self):
     response = test_utils_rfc8040.check_device_connection("XPDR-A2")
     self.assertEqual(response['status_code'], requests.codes.ok)
     self.assertEqual(response['connection-status'], 'connected')