本文整理汇总了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)
示例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')
示例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()
示例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)
示例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'))
示例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'))
示例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)
示例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)
示例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()
示例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()
示例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()
示例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()
示例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)
示例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)
示例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)