• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python fixtures.make_test_env函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中test.fixtures.make_test_env函数的典型用法代码示例。如果您正苦于以下问题:Python make_test_env函数的具体用法?Python make_test_env怎么用?Python make_test_env使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('thing.0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('other.0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('foo.0.0.0.0', 8080, app_fn)
开发者ID:dahukanna,项目名称:tiddlyspace,代码行数:7,代码来源:test_web_use_instance.py


示例2: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('thing.0.0.0.0', 8080, app_fn)
    module.http = httplib2.Http()
    make_fake_space(store, 'thing')
开发者ID:Erls-Corporation,项目名称:tiddlyspace,代码行数:7,代码来源:test_web_status.py


示例3: setup_module

def setup_module(module):
    make_test_env(module)

    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('cdent.0.0.0.0', 8080, app_fn)

    module.http = httplib2.Http()
开发者ID:Alanchi,项目名称:tiddlyspace,代码行数:8,代码来源:test_user.py


示例4: setup_module

def setup_module(module):
    make_test_env(module)
    # we have to have a function that returns the callable,
    # Selector just _is_ the callable
    make_fake_space(module.store, 'cdent')
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('cdent.0.0.0.0', 8080, app_fn)
开发者ID:Alanchi,项目名称:tiddlyspace,代码行数:8,代码来源:test_friendly_uri.py


示例5: setup_module

def setup_module(module):
    global TESTS
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)

    module.http = httplib2.Http()
    TESTS = yaml.load(open('../test/httptest.yaml'))
开发者ID:EnoX1,项目名称:tiddlyspace,代码行数:8,代码来源:test_web_http_api.py


示例6: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)

    module.http = httplib2.Http()

    make_fake_space(module.store, 'cdent')
    module.store.put(User('cdent'))
开发者ID:dahukanna,项目名称:tiddlyspace,代码行数:9,代码来源:test_web_finger.py


示例7: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept("thing.0.0.0.0", 8080, app_fn)

    make_fake_space(store, "thing")
    module.http = httplib2.Http()

    tiddler = Tiddler("OhHi", "thing_public")
    tiddler.text = "!Hi\n"
    store.put(tiddler)
开发者ID:TiddlySpace,项目名称:tiddlyspace,代码行数:11,代码来源:test_web_htmljavascript.py


示例8: setup_module

def setup_module(module):
    make_test_env(module)
    from tiddlyweb.config import config
    module.secret = config['secret']
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    user = User('cdent')
    user.set_password('cow')
    module.store.put(user)
    user = User('fnd')
    module.store.put(user)
开发者ID:Erls-Corporation,项目名称:tiddlyspace,代码行数:11,代码来源:test_mapuser_validate.py


示例9: setup_module

def setup_module(module):
    make_test_env(module, hsearch=True)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept("0.0.0.0", 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept("cdent.0.0.0.0", 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept("fnd.0.0.0.0", 8080, app_fn)
    make_fake_space(module.store, "cdent")
    make_fake_space(module.store, "fnd")
    user = User("cdent")
    user.set_password("cow")
    module.store.put(user)
    module.http = httplib2.Http()
开发者ID:pads,项目名称:tiddlyspace,代码行数:12,代码来源:test_search.py


示例10: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('thing.0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('foo.0.0.0.0', 8080, app_fn)
    user = User('thingone')
    user.set_password('how')
    store.put(user)
    user = User('thingtwo')
    user.set_password('how')
    store.put(user)
    module.http = httplib2.Http()
开发者ID:Alanchi,项目名称:tiddlyspace,代码行数:13,代码来源:test_privacy.py


示例11: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('cdent.0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('bar.example.com', 8080, app_fn)
    make_fake_space(module.store, 'cdent')
    user = User('cdent')
    user.set_password('cow')
    module.store.put(user)
    module.auth = b64encode('cdent:cow')
    user = User('fnd')
    user.set_password('pig')
    module.store.put(user)
    module.badauth = b64encode('fnd:pig')
    module.http = httplib2.Http()
开发者ID:Erls-Corporation,项目名称:tiddlyspace,代码行数:16,代码来源:test_mapspace.py


示例12: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('thing.0.0.0.0', 8080, app_fn)

    make_fake_space(store, 'thing')
    tiddler = Tiddler('ServerSettings', 'thing_public')
    tiddler.text = 'htmltemplate: clean1\n'
    store.put(tiddler)

    tiddler = Tiddler('TestMe', 'thing_public')
    tiddler.text = '# Hi\n\n# one\n# two'
    tiddler.tags = ['alpha', 'beta', '12th monkey']
    store.put(tiddler)
    
    module.http = httplib2.Http()
开发者ID:colmjude,项目名称:tiddlyspace,代码行数:16,代码来源:test_web_clean1.py


示例13: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    from tiddlyweb.config import config
    config['blacklisted_spaces'] = ['scrappy']
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('cdent.0.0.0.0', 8080, app_fn)
    make_fake_space(module.store, 'cdent')
    user = User('cdent')
    user.set_password('cow')
    module.store.put(user)
    user = User('fnd')
    user.set_password('bird')
    module.store.put(user)
    user = User('psd')
    user.set_password('cat')
    module.store.put(user)
开发者ID:EnoX1,项目名称:tiddlyspace,代码行数:17,代码来源:test_space_handler.py


示例14: setup_module

def setup_module(module):
    make_test_env(module)
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)

    module.http = httplib2.Http()

    bag = Bag('place')
    store.put(bag)
    manifest = Tiddler('manifest', 'place')
    manifest.type = MANIFEST_TYPE
    manifest.text = BASE_MANIFEST
    store.put(manifest)

    notmanifest = Tiddler('notmanifest', 'place')
    manifest.text = 'oh hi'
    store.put(notmanifest)
开发者ID:Erls-Corporation,项目名称:tiddlyspace,代码行数:17,代码来源:test_web_repudiate.py


示例15: setup_module

def setup_module(module):
    make_test_env(module)

    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('0.0.0.0', 8080, app_fn)
    wsgi_intercept.add_wsgi_intercept('cdent.0.0.0.0', 8080, app_fn)

    make_fake_space(module.store, 'fnd')
    make_fake_space(module.store, 'cdent')
    make_fake_space(module.store, 'psd')

    users = {
        'fnd': 'foo',
        'cdent': 'bar',
        'psd': 'baz'
    }
    for username, password in users.items():
        user = User(username)
        user.set_password(password)
        module.store.put(user)
开发者ID:EnoX1,项目名称:tiddlyspace,代码行数:20,代码来源:test_subscription.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python fixtures.KafkaFixture类代码示例发布时间:2022-05-27
下一篇:
Python fixtures.make_fake_space函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap