def setup_module(module):
    if os.path.exists('store'):
        shutil.rmtree('store')
    init(config)
    module.savedin = sys.stdin
    module.store = get_store(config)
    module.store.put(Bag('bag1'))
def setup_module(module):
    init(config)
    module.environ = { 'tiddlyweb.config': config }
    serializer = Serializer('json')
    module.tiddlers = Tiddlers()
    for title, json in test_tiddlers:
        tiddler = Tiddler(title)
        serializer.object = tiddler
        serializer.from_string(json)
        module.tiddlers.add(tiddler)