Пример #1
0
    def test_service_primary(self):
        """Test the service primary flag."""
        # Invoke the bluez GATT library to access the mock GATT service
        test_service = GATT.Service(self.svc_dpath)

        # Test for the UUID
        self.assertEqual(test_service.primary, True)
Пример #2
0
    def test_service_uuid(self):
        """Test the service UUID."""
        # Invoke the bluez GATT library to access the mock GATT service
        test_service = GATT.Service(self.svc_dpath)

        # Test for the UUID
        self.assertEqual(test_service.UUID, '180F')
Пример #3
0
    def test_service_device(self):
        """Test the service device path."""
        # Invoke the bluez GATT library to access the mock GATT service
        test_service = GATT.Service(self.svc_dpath)

        # Test for the device path
        dev_underscore = self.address.replace(':', '_').upper()
        dev_addr = '{0}/dev_{1}'.format(self.ad_dpath, dev_underscore)
        self.assertEqual(test_service.device, dev_addr)