def test_get_item_mm_field(self):
        """
        REST Api: Test get item with M-M related field
        """
        client = self.app.test_client()
        token = self.login(client, USERNAME_ADMIN, PASSWORD_ADMIN)

        with model_mm_parent_data(self.appbuilder.session, 1, 4) as models:
            model_id = models[0].id
            rv = self.auth_client_get(client, token, f"api/v1/modelmmapi/{model_id}")
            data = json.loads(rv.data.decode("utf-8"))
            self.assertEqual(rv.status_code, 200)
            expected_rel_field = [
                {
                    "field_string": child.field_string,
                    "field_integer": child.field_integer,
                    "id": child.id,
                }
                for child in models[0].children
            ]
            self.assertEqual(data[API_RESULT_RES_KEY]["children"], expected_rel_field)

        REST Api: Test get item with M-M related field
        
tests/test_api.py