def test_configuration_invalid(self, _): """Test adapter name pattern parsing.""" backend = BluepyBackend(adapter='somestring') with self.assertRaises(BluetoothBackendException): backend.connect(TEST_MAC)
def test_supports_scanning(self): """Check if scanning is set correctly.""" backend = BluepyBackend() self.assertTrue(backend.supports_scanning())
def test_check_backend_ok(self): """Test check_backend successfully.""" self.assertTrue(BluepyBackend.check_backend())
def test_connect_exception(self, mock_peripheral): """Test exception wrapping.""" mock_peripheral.side_effect = BTLEException('Test') backend = BluepyBackend() with self.assertRaises(BluetoothBackendException): backend.connect(TEST_MAC)
def test_connect_exception(self, _): """Test exception wrapping.""" backend = BluepyBackend() with self.assertRaises(BluetoothBackendException): backend.connect(TEST_MAC)