コード例 #1
0
def setup_module(module):
	server_store = module.config["server_store"]
	store_config = server_store[1]
	store_config.update({ "store_module": server_store[0] })
	module.config["server_store"] = ["sslstore", store_config]
	module.config["ssl_bags"] = ["bagtwo", "bagfour"]
	module.store = _teststore()
コード例 #2
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    user = User(u'cd\u2714nt')
    user.set_password('cowpig')
    module.store.put(user)
    muchdata(module.store)
コード例 #3
0
def setup_module(module):
    config['system_plugins'].append('test.test_web_extract')
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    user = User('cow')
    user.set_password('pig')
    module.store.put(user)
コード例 #4
0
def setup_module(module):
    config['system_plugins'].append('test.test_web_extract')
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    user = User('cow')
    user.set_password('pig')
    module.store.put(user)
コード例 #5
0
ファイル: test_web_bags.py プロジェクト: rdrake98/tiddlyweb
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()

    for i in xrange(5):
        bag = Bag('bag%s' % i)
        module.store.put(bag)
コード例 #6
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()

    for i in xrange(5):
        bag = Bag('bag%s' % i)
        module.store.put(bag)
コード例 #7
0
ファイル: test_web_recipe.py プロジェクト: rdrake98/tiddlyweb
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)
コード例 #8
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()

    for i in xrange(5):
        recipe = Recipe('recipe%s' % i)
        recipe.set_recipe([('monkey', '')])
        module.store.put(recipe)
コード例 #9
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()

    for i in xrange(5):
        recipe = Recipe('recipe%s' % i)
        recipe.set_recipe([('monkey', '')])
        module.store.put(recipe)
コード例 #10
0
def setup_module(module):
    config["auth_systems"].append("not.really.there")
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User("cdent")
    user.set_password("cowpig")
    store.put(user)
コード例 #11
0
def setup_module(module):
    config['auth_systems'].append('not.really.there')
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    store.put(user)
コード例 #12
0
ファイル: test_web_challenge.py プロジェクト: FND/tiddlyweb
def setup_module(module):
    config['auth_systems'].append('not.really.there')
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    store.put(user)
コード例 #13
0
def setup_module(module):
    from tiddlyweb.web import serve
    serve.config['extractors'].append('saliva')
    def app_fn():
        return serve.load_app()
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('our_test_domain', 8001, app_fn)
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)
コード例 #14
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()

    bag = Bag('bag0')
    module.store.put(bag)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)
コード例 #15
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()

    bag = Bag('bag0')
    module.store.put(bag)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)
コード例 #16
0
def setup_module(module):
    from tiddlyweb.web import serve
    # we have to have a function that returns the callable,
    # Selector just _is_ the callable
    def app_fn():
        return serve.load_app()
    #wsgi_intercept.debuglevel = 1
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('our_test_domain', 8001, app_fn)

    reset_textstore()
    module.store = _teststore()
コード例 #17
0
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)

    try:
        os.mkdir('.test_cache')
    except OSError:
        pass  # we don't care if it already exists
コード例 #18
0
ファイル: test_web_tiddler.py プロジェクト: tup/tiddlyweb
def setup_module(module):
    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)

    try:
        os.mkdir('.test_cache')
    except OSError:
        pass # we don't care if it already exists
コード例 #19
0
def http_test(test_data, base):
    global tests, store, http, base_url
    base_url = base
    tests = test_data
    initialize_app()
    reset_textstore()
    store = _teststore()
    muchdata(store)

    # we're going to need a user for testing auth stuff
    # so make that now
    user = User('cdent')
    user.set_password('cowpig')
    store.put(user)
    http = httplib2.Http()
コード例 #20
0
def http_test(test_data, base):
    global tests, store, http, base_url
    base_url = base
    tests = test_data
    initialize_app()
    reset_textstore()
    store = _teststore()
    muchdata(store)

    # we're going to need a user for testing auth stuff
    # so make that now
    user = User('cdent')
    user.set_password('cowpig')
    store.put(user)
    http = httplib2.Http()
コード例 #21
0
def setup_module(module):
    from tiddlyweb.web import serve

    # we have to have a function that returns the callable,
    # Selector just _is_ the callable
    def app_fn():
        return serve.load_app()

    #wsgi_intercept.debuglevel = 1
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('our_test_domain', 8001, app_fn)

    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)
コード例 #22
0
def setup_module(module):
    from tiddlyweb.filters.select import ATTRIBUTE_SELECTOR
    from tiddlyweb.filters import FilterError
    def hell_raiser(entity, attribute, value):
        raise FilterError('no good man')
    ATTRIBUTE_SELECTOR['error'] = hell_raiser

    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)
コード例 #23
0
def setup_module(module):
    from tiddlyweb.web import serve
    def app_fn():
        return serve.load_app()
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('our_test_domain', 8001, app_fn)

    reset_textstore()
    module.store = _teststore()

    bag = Bag('bag0')
    module.store.put(bag)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)
コード例 #24
0
def setup_module(module):
    from tiddlyweb.web import serve

    serve.config["auth_systems"].append("not.really.there")

    def app_fn():
        return serve.load_app()

    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept("our_test_domain", 8001, app_fn)
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User("cdent")
    user.set_password("cowpig")
    store.put(user)
コード例 #25
0
ファイル: test_web_recipe.py プロジェクト: funkyeah/tiddlyweb
def setup_module(module):
    from tiddlyweb.filters.select import ATTRIBUTE_SELECTOR
    from tiddlyweb.filters import FilterError

    def hell_raiser(entity, attribute, value):
        raise FilterError('no good man')

    ATTRIBUTE_SELECTOR['error'] = hell_raiser

    initialize_app()
    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)
コード例 #26
0
def setup_module(module):
    from tiddlyweb.web import serve
    def app_fn():
        return serve.load_app()
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('our_test_domain', 8001, app_fn)

    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    # we're going to need a user for testing auth stuff
    # so make that now
    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)

    module.http = httplib2.Http()
コード例 #27
0
def test_storage(): # ensure actual store still works as expected
	bag_name = "Bar"
	title = "Foo"
	text = "lorem ipsum\ndolor sit amet"

	store = _teststore()
	bag = Bag(bag_name)
	store.put(bag)
	tiddler = Tiddler(title, bag_name)
	tiddler.text = "lorem ipsum\ndolor sit amet"
	store.put(tiddler)

	b = store.get(Bag(bag_name))
	t = store.get(Tiddler(title, bag_name))

	assert b.name == bag_name
	assert t.title == title
	assert t.bag == bag_name
	assert t.text == text
コード例 #28
0
def setup_module(module):
    from tiddlyweb.web import serve
    # we have to have a function that returns the callable,
    # Selector just _is_ the callable
    def app_fn():
        return serve.load_app()
    #wsgi_intercept.debuglevel = 1
    httplib2_intercept.install()
    wsgi_intercept.add_wsgi_intercept('our_test_domain', 8001, app_fn)

    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)

    user = User('cdent')
    user.set_password('cowpig')
    module.store.put(user)

    try:
        os.mkdir('.test_cache')
    except OSError:
        pass # we don't care if it already exists
コード例 #29
0
ファイル: test_web_bag.py プロジェクト: tup/tiddlyweb
def setup_module(module):
    initialize_app()

    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)
コード例 #30
0
ファイル: test_store_tiddler.py プロジェクト: FND/tiddlyweb
def setup_module(module):
    """
    Need to clean up the store here.
    """
    reset_textstore()
    module.store = _teststore()
コード例 #31
0
def setup_module(module):
    initialize_app()

    reset_textstore()
    module.store = _teststore()
    muchdata(module.store)
コード例 #32
0
def setup_module(module):
    """
    Need to clean up the store here.
    """
    reset_textstore()
    module.store = _teststore()
コード例 #33
0
def setup_module(module):
    reset_textstore()
    module.store = _teststore()
    module.bag = Bag('bag/puss')
    module.store.put(module.bag)
コード例 #34
0
def setup_module(module):
    reset_textstore()
    module.store = _teststore()
コード例 #35
0
ファイル: test_roundtrip.py プロジェクト: rdrake98/tiddlyweb
def setup_module(module):
    reset_textstore()
    module.store = _teststore()
    if type(module.store.storage) != tiddlyweb.stores.text.Store:
        py.test.skip('skipping this test for non-text store')
コード例 #36
0
def setup_module(module):
    reset_textstore()
    module.store = _teststore()
    module.bag = Bag('bag/puss')
    module.store.put(module.bag)
コード例 #37
0
def setup_module(module):
    reset_textstore()
    module.store = _teststore()
コード例 #38
0
def setup_module(module):
    reset_textstore()
    module.store = _teststore()
    if type(module.store.storage) != tiddlyweb.stores.text.Store:
        py.test.skip('skipping this test for non-text store')
    muchdata(module.store)