Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2df7207 authored by Charlie Boutier's avatar Charlie Boutier
Browse files

Avatar: Adapt the test and the config

Adapt the test and the config since Avatar has been refactored.

Test: atest avatar
Bug: 254077091
Change-Id: I16b3a4469db121296182e7244e0eef06dfe81c3b
parent c24910d7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -4,9 +4,6 @@ TestBeds:
- Name: ExampleTest
  Controllers:
    AndroidDevice: '*'
    PandoraDevice:
    - class: AndroidPandoraDevice
      config: '*'
    - class: BumblePandoraDevice
      transport: 'tcp-client:127.0.0.1:7300'
    BumbleDevice:
    - transport: 'tcp-client:127.0.0.1:7300'
      classic_enabled: true
 No newline at end of file
+8 −5
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ from mobly.asserts import *
from bumble.smp import PairingDelegate

from avatar.utils import Address, AsyncQueue
from avatar.controllers import pandora_device
from avatar.pandora_client import PandoraClient
from avatar.pandora_device_util import PandoraDeviceUtil
from pandora.host_pb2 import (
    DiscoverabilityMode, DataTypes, OwnAddressType
)
@@ -38,13 +39,15 @@ from pandora.security_pb2 import (

class ExampleTest(base_test.BaseTestClass):
    def setup_class(self):
        self.pandora_devices = self.register_controller(pandora_device)
        self.dut: pandora_device.PandoraDevice = self.pandora_devices[0]
        self.ref: pandora_device.BumblePandoraDevice = self.pandora_devices[1]
        self.pandora_util = PandoraDeviceUtil(self)
        self.dut, self.ref = self.pandora_util.get_pandora_devices()

    def teardown_class(self):
        self.pandora_util.cleanup()

    @avatar.asynchronous
    async def setup_test(self):
        async def reset(device: pandora_device.PandoraDevice):
        async def reset(device: PandoraClient):
            await device.host.FactoryReset()
            device.address = (await device.host.ReadLocalAddress(wait_for_ready=True)).address