当前位置: 首页>>代码示例>>Python>>正文


Python FriendHelper.serialize方法代码示例

本文整理汇总了Python中rogerthat.bizz.friend_helper.FriendHelper.serialize方法的典型用法代码示例。如果您正苦于以下问题:Python FriendHelper.serialize方法的具体用法?Python FriendHelper.serialize怎么用?Python FriendHelper.serialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rogerthat.bizz.friend_helper.FriendHelper的用法示例。


在下文中一共展示了FriendHelper.serialize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_cs_helper_for_user

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
 def test_cs_helper_for_user(self):
     helper = FriendHelper.serialize(self.john, FriendTO.TYPE_USER)
     self.assertIsInstance(helper.get_profile_info(), UserProfile)
     self.assertIsNone(helper.get_service_profile())
     self.assertIsNone(helper.get_share_sid())
     self.assertIsNone(helper.get_translator())
     self.assertIsNone(helper.get_service_data())
     self.assertListEqual(helper.list_service_menu_items(), [])
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:test_update_friends.py

示例2: _serialize_and_update_friend_for_service_identity

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
def _serialize_and_update_friend_for_service_identity(service_identity_user, clear_broadcast_settings_cache,
                                                      get_fsics_query_function, get_fsics_query_function_args,
                                                      worker_queue=HIGH_LOAD_WORKER_QUEUE):
    helper = FriendHelper.serialize(service_identity_user, FRIEND_TYPE_SERVICE)

    run_job(get_fsics_query_function, get_fsics_query_function_args, _update_friend_via_friend_connection,
            [helper, clear_broadcast_settings_cache],
            worker_queue=worker_queue)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:10,代码来源:update_friends.py

示例3: trans

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
    def trans(user):
        helper = FriendHelper.serialize(user, friend_type)

        if friend_type == FRIEND_TYPE_SERVICE:
            user = remove_slash_default(user)
        else:
            update_friend_service_identity_connections(UserProfile.createKey(user), changed_properties)

        run_job(get_friends_friends_maps_keys_query, [user], _update_friend, [helper, clear_broadcast_settings_cache],
                worker_queue=worker_queue)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:12,代码来源:update_friends.py

示例4: test_friend_to

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
    def test_friend_to(self):
        self._extend_service()

        app_user = users.User(u'[email protected]')
        create_user_profile(app_user, u"John Doe")
        makeFriends(app_user, self.service_user, self.service_user, None, ORIGIN_USER_INVITE)

        cs_helper = FriendHelper.serialize(self.service_identity_user, FriendTO.TYPE_SERVICE)
        ds_helper = FriendHelper.from_data_store(self.service_user, FriendTO.TYPE_SERVICE)

        friend_map = get_friends_map(app_user)
        friend_detail = friend_map.friendDetails[self.service_user.email()]
        status = UpdateFriendRequestTO.STATUS_MODIFIED
        ds_friend = convert_friend(ds_helper, app_user, friend_detail, status)
        cs_friend = convert_friend(cs_helper, app_user, friend_detail, status)

        self.assertDictEqual(ds_friend.to_dict(), cs_friend.to_dict())
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:19,代码来源:test_update_friends.py

示例5: connect_auto_connected_service

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
def connect_auto_connected_service(app_id, acs):
    # type: (unicode, AutoConnectedService) -> None
    helper = FriendHelper.serialize(users.User(acs.service_identity_email), FRIEND_TYPE_SERVICE)
    run_job(get_user_profile_keys_by_app_id, [app_id],
            hookup_with_default_services.run_for_auto_connected_service, [acs, None, helper])
开发者ID:rogerthat-platform,项目名称:rogerthat-backend,代码行数:7,代码来源:app.py

示例6: test_cs_helper_for_complex_service

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
 def test_cs_helper_for_complex_service(self):
     self._extend_service()
     helper = FriendHelper.serialize(self.service_identity_user, FriendTO.TYPE_SERVICE)
     self._assert_complex_service(helper)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:6,代码来源:test_update_friends.py

示例7: test_cs_helper_for_simple_service

# 需要导入模块: from rogerthat.bizz.friend_helper import FriendHelper [as 别名]
# 或者: from rogerthat.bizz.friend_helper.FriendHelper import serialize [as 别名]
 def test_cs_helper_for_simple_service(self):
     helper = FriendHelper.serialize(self.service_identity_user, FriendTO.TYPE_SERVICE)
     self._assert_simple_service(helper)
开发者ID:our-city-app,项目名称:mobicage-backend,代码行数:5,代码来源:test_update_friends.py


注:本文中的rogerthat.bizz.friend_helper.FriendHelper.serialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。