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

Commit 50a8aa54 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add a pre-test mmi to get the pts address" am: cc50f179 am:...

Merge "Add a pre-test mmi to get the pts address" am: cc50f179 am: 9a314270 am: 9468c621 am: 2dcc0d0b

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2163199



Change-Id: Ia8a406fe59392b42a71c2cee2c95f31509a0b8fa
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents eac7fbfd 2dcc0d0b
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -11,18 +11,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Profile proxy base module."""

from mmi2grpc._helpers import format_function
from mmi2grpc._helpers import assert_description

import sys


class ProfileProxy:
    """Profile proxy base class."""

    def interact(
            self, test: str, mmi_name: str, mmi_description: str,
            pts_addr: bytes):
    def interact(self, test: str, mmi_name: str, mmi_description: str, pts_addr: bytes):
        """Translate a MMI call to its corresponding implementation.

        Args:
@@ -37,8 +37,10 @@ class ProfileProxy:
        try:
            if not mmi_name.isidentifier():
                mmi_name = "_mmi_" + mmi_name
            return getattr(self, mmi_name)(
                test=test, description=mmi_description, pts_addr=pts_addr)
            return getattr(self, mmi_name)(test=test, description=mmi_description, pts_addr=pts_addr)
        except AttributeError:
            code = format_function(mmi_name, mmi_description)
            assert False, f'Unhandled mmi {id}\n{code}'

    def test_started(self, test: str, description: str, pts_addr: bytes):
        return "OK"