當前位置: 首頁>>代碼示例>>Python>>正文


Python App.secure方法代碼示例

本文整理匯總了Python中rogerthat.models.App.secure方法的典型用法代碼示例。如果您正苦於以下問題:Python App.secure方法的具體用法?Python App.secure怎麽用?Python App.secure使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在rogerthat.models.App的用法示例。


在下文中一共展示了App.secure方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

# 需要導入模塊: from rogerthat.models import App [as 別名]
# 或者: from rogerthat.models.App import secure [as 別名]
    def setUp(self, datastore_hr_probability=0):
        from rogerthat.bizz.profile import create_user_profile
        from rogerthat.settings import get_server_settings
        from rogerthat.rpc import users
        from google.appengine.datastore import datastore_stub_util
        from google.appengine.ext import testbed
        from rogerthat_tests import register_tst_mobile
        from rogerthat.to.payment import PaymentProviderTO
        from rogerthat.bizz.payment import create_payment_provider

        os.environ['HTTP_HOST'] = 'rt.dev:8080'

        self.testbed = testbed.Testbed()
        self.testbed.activate()
        self.datastore_hr_policy = datastore_stub_util.PseudoRandomHRConsistencyPolicy(
            probability=datastore_hr_probability)
        self.testbed.init_datastore_v3_stub(consistency_policy=self.datastore_hr_policy)
        self.testbed.init_taskqueue_stub(root_path=os.path.join(os.path.dirname(__file__), '..', 'src'))
        self.task_queue_stub = self.testbed.get_stub(testbed.TASKQUEUE_SERVICE_NAME)
        self.testbed.init_channel_stub()
        self.testbed.init_search_stub()
        self.testbed.init_blobstore_stub()

        ss = get_server_settings()
        ss.baseUrl = "http://localhost:8080"  # not used
        ss.mobidickAddress = "http://1.2.3.4:8090"  # not used
        ss.jabberEndPoints = ["jabber.example.com:8084"]  # Development jabber server
        ss.jabberSecret = "leeg"
        ss.userCodeCipher = u"dGVzdCAlcyB0ZXN0"
        ss.dashboardEmail = u"[email protected]"
        ss.supportEmail = u"[email protected]"
        ss.supportWorkers = ["[email protected]"]
        ss.serviceCreators = ["djmatic", "[email protected]", "", "[email protected]"]
        ss.staticPinCodes = ["0666", "[email protected]"]
        ss.userEncryptCipherPart1 = base64.b64encode(u'userEncryptCipherPart1')
        ss.userEncryptCipherPart2 = base64.b64encode(u'userEncryptCipherPart2')

        rogerthat_app = App(key=App.create_key(u"rogerthat"))
        rogerthat_app.name = u"Rogerthat"
        rogerthat_app.type = App.APP_TYPE_ROGERTHAT
        rogerthat_app.core_branding_hash = None
        rogerthat_app.facebook_app_id = 188033791211994
        rogerthat_app.ios_app_id = u"id446796149"
        rogerthat_app.android_app_id = u"com.mobicage.rogerth.at"
        rogerthat_app.secure = True
        rogerthat_app.is_default = True
        rogerthat_app.visible = True
        rogerthat_app.creation_time = now()
        rogerthat_app.admin_services = [u'[email protected]']
        rogerthat_app.mdp_client_id = str(uuid.uuid4())
        rogerthat_app.mdp_client_secret = str(uuid.uuid4())

        be_loc_app = App(key=App.create_key(u"be-loc"))
        be_loc_app.name = u"Lochristi"
        be_loc_app.type = App.APP_TYPE_CITY_APP
        be_loc_app.core_branding_hash = None
        be_loc_app.facebook_app_id = 188033791211994
        be_loc_app.ios_app_id = u"com.mobicage.cityapp.lochristi"
        be_loc_app.android_app_id = u"com.mobicage.cityapp.lochristi"
        be_loc_app.creation_time = now()
        be_loc_app.secure = False
        be_loc_app.is_default = False
        be_loc_app.visible = True
        be_loc_app.mdp_client_id = str(uuid.uuid4())
        be_loc_app.mdp_client_secret = str(uuid.uuid4())

        be_berlare_app = App(key=App.create_key(u"be-berlare"))
        be_berlare_app.name = u"Berlare"
        be_berlare_app.type = App.APP_TYPE_CITY_APP
        be_berlare_app.core_branding_hash = None
        be_berlare_app.facebook_app_id = None
        be_berlare_app.ios_app_id = u"com.mobicage.cityapp.berlare"
        be_berlare_app.android_app_id = u"com.mobicage.cityapp.berlare"
        be_berlare_app.creation_time = now()
        be_berlare_app.secure = False
        be_berlare_app.is_default = False
        be_berlare_app.visible = True
        be_berlare_app.mdp_client_id = str(uuid.uuid4())
        be_berlare_app.mdp_client_secret = str(uuid.uuid4())

        osa_loyalty_app = App(key=App.create_key(u"osa-loyalty"))
        osa_loyalty_app.name = u"OSA Loyalty"
        osa_loyalty_app.type = App.APP_TYPE_CONTENT_BRANDING
        osa_loyalty_app.core_branding_hash = None
        osa_loyalty_app.facebook_app_id = 188033791211994
        osa_loyalty_app.ios_app_id = u"com.mobicage.rogerthat.osa.loyalty"
        osa_loyalty_app.android_app_id = u"com.mobicage.rogerthat.osa.loyalty"
        osa_loyalty_app.creation_time = now()
        osa_loyalty_app.is_default = False
        osa_loyalty_app.visible = True

        put_and_invalidate_cache(ss, rogerthat_app, be_loc_app, be_berlare_app, osa_loyalty_app)

        create_payment_provider(PaymentProviderTO(id=u"payconiq",
                                                  name=u"Payconiq",
                                                  logo=None,
                                                  version=1,
                                                  description=u"payconiq descripion is markdown",
                                                  oauth_settings=None,
                                                  background_color=None,
#.........這裏部分代碼省略.........
開發者ID:rogerthat-platform,項目名稱:rogerthat-backend,代碼行數:103,代碼來源:mc_unittest.py


注:本文中的rogerthat.models.App.secure方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。