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)
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')
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()
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)
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'))
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'))
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)
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)
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)
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()
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)
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()
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('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()
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()
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()
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()
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()
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)
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)
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)
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.tiddler_modified = tiddler.modified module.http = httplib2.Http()
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)