def test_post_new_user(): http = httplib2.Http() # XXX simon removed the code that makes this test pass # response, content = http.request('http://our_test_domain:8001/users', # method='POST', # headers={'Content-Type': 'application/json'}, # body='{"username":"******","password":"******"}') # # assert response['status'] == '403' # assert 'insufficient' in content response, content = http.request('http://our_test_domain:8001/users', method='POST', headers={'Content-Type': 'application/json', 'Authorization': 'Basic %s' % admin_authorization}, body='{"username":"******","password":"******"}') assert response['status'] == '201' user = User('cdent') user = store.get(user) assert user.check_password('pigdog') is True assert user.check_password('slam') is False response, content = http.request('http://our_test_domain:8001/users', method='POST', headers={'Content-Type': 'application/json', 'Authorization': 'Basic %s' % admin_authorization}, body='{"username":"******","password":"******"}') assert response['status'] == '409' assert 'User exists' in content
def test_put_password(): http = httplib2.Http() response, content = http.request('http://our_test_domain:8001/users/cdent', method='PUT', headers={'Content-Type': 'application/json'}, body='{"password":"******"}') assert response['status'] == '403' response, content = http.request('http://our_test_domain:8001/users/cdent', method='PUT', headers={'Content-Type': 'application/json', 'Authorization': 'Basic %s' % user_authorization}, body='{"password":"******"}') assert response['status'] == '204' user = User('cdent') user = store.get(user) assert user.check_password('pigcat') is True assert user.check_password('pigdog') is False response, content = http.request('http://our_test_domain:8001/users/cdent', method='PUT', headers={'Content-Type': 'application/json', 'Authorization': 'Basic %s' % admin_authorization}, body='{"password":"******"}') assert response['status'] == '204' user = User('cdent') user = store.get(user) assert user.check_password('pigcow') is True assert user.check_password('pigcat') is False
def test_simple_get(): user = User("cdent") user = store.get(user) assert user.note == "foo" assert user.check_password("cowpig") assert sorted(user.list_roles()) == ["ADMIN", "BOSS"] assert not user.check_password("pigcow")
def test_simple_get(): user = User('cdent') user = store.get(user) assert user.note == 'foo' assert user.check_password('cowpig') assert sorted(user.list_roles()) == ['ADMIN', 'BOSS'] assert not user.check_password('pigcow')
def test_simple_get(): user = User('cdent') user = store.get(user) assert user.note == 'foo' assert user.check_password('cowpig') assert sorted(user.list_roles()) == ['ADMIN', 'BOSS'] assert not user.check_password('pigcow')
def test_adduser_with_roles(): handle(['', u'adduser', u'cdent', u'crunk', u'cow', u'monkey']) the_user = User('cdent') the_user = store.get(the_user) assert the_user.check_password('crunk') assert 'cow' in the_user.list_roles() assert 'monkey' in the_user.list_roles()
def _validate_and_redirect(self, environ, start_response, username, password, redirect): """ Check a username and password. If valid, send a cookie to the client. If it is not, send the form again. """ status = '401 Unauthorized' try: store = environ['tiddlyweb.store'] secret = environ['tiddlyweb.config']['secret'] user = User(username) store.get(user) if user.check_password(password): uri = '%s%s' % (server_host_url(environ), redirect) import re uri = re.sub("/recipes/portal(-.*)?/", "/recipes/portal-"+username+"/", uri) # uri = uri.replace("/recipes/portal/", # print "USERNAME" + username # print "URI" + uri cookie = Cookie.SimpleCookie() secret_string = sha('%s%s' % (user.usersign, secret)).hexdigest() cookie['tiddlyweb_user'] = '******' % (user.usersign, secret_string) cookie['tiddlyweb_user']['path'] = '/' start_response('303 See Other', [ ('Set-Cookie', cookie.output(header='')), ('Location', uri) ]) return [uri] except KeyError: pass except NoUserError: pass return self._send_cookie_form(environ, start_response, redirect, status, 'User or Password no good')
def _validate_and_redirect(self, environ, start_response, username, password, redirect): """ Check a username and password. If valid, send a cookie to the client. If it is not, send the form again. """ status = "401 Unauthorized" try: store = environ["tiddlyweb.store"] secret = environ["tiddlyweb.config"]["secret"] cookie_age = environ["tiddlyweb.config"].get("cookie_age", None) user = User(username) user = store.get(user) if user.check_password(password): uri = "%s%s" % (server_host_url(environ), redirect) cookie_header_string = make_cookie( "tiddlyweb_user", user.usersign, mac_key=secret, path=self._cookie_path(environ), expires=cookie_age ) logging.debug("303 to %s", uri) start_response("303 Other", [("Set-Cookie", cookie_header_string), ("Location", uri.encode("utf-8"))]) return [uri] except KeyError: pass except NoUserError: pass return self._send_cookie_form(environ, start_response, redirect, status, "User or Password no good")
def _validate_and_redirect(self, environ, start_response, username, password, redirect): """ Check a username and password. If valid, send a cookie to the client. If it is not, send the form again. """ status = "401 Unauthorized" try: store = environ["tiddlyweb.store"] secret = environ["tiddlyweb.config"]["secret"] user = User(username) user = store.get(user) if user.check_password(password): uri = "%s%s" % (server_host_url(environ), redirect) cookie = Cookie.SimpleCookie() secret_string = sha("%s%s" % (user.usersign, secret)).hexdigest() cookie["tiddlyweb_user"] = "******" % (user.usersign, secret_string) cookie["tiddlyweb_user"]["path"] = self._cookie_path(environ) logging.debug("303 to %s" % uri) start_response("303 Other", [("Set-Cookie", cookie.output(header="")), ("Location", uri)]) return [uri] except KeyError: pass except NoUserError: pass return self._send_cookie_form(environ, start_response, redirect, status, "User or Password no good")
def test_adduser_with_roles(): handle(['', u'adduser', u'cdent', u'crunk', u'cow', u'monkey']) the_user = User('cdent') the_user = store.get(the_user) assert the_user.check_password('crunk') assert 'cow' in the_user.list_roles() assert 'monkey' in the_user.list_roles()
def _validate_and_redirect(self, environ, start_response, username, password, redirect): """ Check a username and password. If valid, send a cookie to the client. If it is not, send the form again. """ status = '401 Unauthorized' try: store = environ['tiddlyweb.store'] secret = environ['tiddlyweb.config']['secret'] cookie_age = environ['tiddlyweb.config'].get('cookie_age', None) user = User(username) user = store.get(user) if user.check_password(password): uri = '%s%s' % (server_host_url(environ), redirect) cookie_header_string = make_cookie('tiddlyweb_user', user.usersign, mac_key=secret, path=self._cookie_path(environ), expires=cookie_age) logging.debug('303 to %s', uri) start_response('303 Other', [('Set-Cookie', cookie_header_string), ('Content-Type', 'text/plain'), ('Location', uri.encode('utf-8'))]) return [uri] except KeyError: pass except NoUserError: pass return self._send_cookie_form(environ, start_response, redirect, status, 'User or Password no good')
def _validate_and_redirect(self, environ, start_response, username, password, redirect): """ Check a username and password. If valid, send a cookie to the client. If it is not, send the form again. """ status = '401 Unauthorized' try: store = environ['tiddlyweb.store'] secret = environ['tiddlyweb.config']['secret'] cookie_age = environ['tiddlyweb.config'].get('cookie_age', None) user = User(username) user = store.get(user) if user.check_password(password): uri = '%s%s' % (server_host_url(environ), redirect) cookie_header_string = make_cookie( 'tiddlyweb_user', user.usersign, mac_key=secret, path=self._cookie_path(environ), expires=cookie_age) logging.debug('303 to %s', uri) start_response('303 Other', [('Set-Cookie', cookie_header_string), ('Content-Type', 'text/plain'), ('Location', uri.encode('utf-8'))]) return [uri] except KeyError: pass except NoUserError: pass return self._send_cookie_form(environ, start_response, redirect, status, 'User or Password no good')
def test_store_user(): user = User('testuser') user.set_password('testpass') user.add_role('testrole') store.put(user) assert os.path.exists('store/testuser.user') loaded_user = User('testuser') loaded_user = store.get(loaded_user) assert loaded_user.check_password('testpass')
def test_store_user(): user = User('testuser') user.set_password('testpass') user.add_role('testrole') store.put(user) assert os.path.exists('store/testuser.user') loaded_user = User('testuser') loaded_user = store.get(loaded_user) assert loaded_user.check_password('testpass')
def extract(self, environ, start_response): """ Look in the request for an Authorization header. """ user_info = environ.get('HTTP_AUTHORIZATION', None) if user_info is None: return False if user_info.startswith('Basic'): user_info = user_info.strip().split(' ')[1] candidate_username, password = b64decode(user_info).split(':') try: store = environ['tiddlyweb.store'] user = User(candidate_username) user = store.get(user) if user.check_password(password): return {"name": user.usersign, "roles": user.list_roles()} except (NoUserError, StoreMethodNotImplemented): pass return False
def _validate_and_redirect(self, environ, start_response, username, password, redirect): """ Check a username and password. If valid, send a cookie to the client. If it is not, send the form again. """ status = '401 Unauthorized' try: store = environ['tiddlyweb.store'] secret = environ['tiddlyweb.config']['secret'] cookie_age = environ['tiddlyweb.config'].get('cookie_age', None) user = User(username) user = store.get(user) if user.check_password(password): uri = '%s%s' % (server_host_url(environ), redirect) cookie_header_string = make_cookie('tiddlyweb_user', user.usersign, mac_key=secret, path=self._cookie_path(environ), expires=cookie_age) logging.debug('303 to %s', uri) start_response('303 Other', [('Set-Cookie', cookie_header_string), ('Location', uri.encode('utf-8')), ('Pragma', 'no-cache')]) return [uri] except KeyError: pass except NoUserError: logging.debug('NoUserError for: '+username) template = templating.get_template(environ, 'login_form.html') start_response(status, [ ('Content-Type', 'text/html'), ('Pragma', 'no-cache') ]) return template.render(redirect=redirect, commonVars=templating.common_vars(environ), error=True)
def test_adduser(): handle(['', u'adduser', u'cdent', u'crunk']) the_user = User('cdent') the_user = store.get(the_user) assert the_user.check_password('crunk')
def test_make_a_bunch(): for x in xrange(RANGE): bag_name = u'bag%s' % x recipe_name = u'recipe%s' % x tiddler_name = u'tiddler%s' % x recipe_list = [(bag_name, '')] tiddler_text = u'hey ho %s' % x field_name = u'field%s' % x field_name2 = u'fieldone%s' % x tag_name = u'tag%s' % x user_name = u'user%s' % x user_pass = u'pass%s' % x user_note = u'note%s' % x user_roles = [u'rolehold', u'role%s' % x] bag = Bag(bag_name) bag.policy.owner = u'owner%s' % x bag.policy.read = [u'hi%s' % x, u'andextra'] bag.policy.manage = [u'R:hi%s' % x, u'andmanage'] store.put(bag) recipe = Recipe(recipe_name) recipe.policy.owner = u'owner%s' % x recipe.policy.read = [u'hi%s' % x, u'andextra'] recipe.policy.manage = [u'R:hi%s' % x, u'andmanage'] recipe.set_recipe(recipe_list) store.put(recipe) tiddler = Tiddler(tiddler_name, bag_name) tiddler.text = tiddler_text tiddler.fields[field_name] = field_name tiddler.fields[field_name2] = field_name2 tiddler.fields['server.host'] = 'gunky' tiddler.tags = [tag_name] store.put(tiddler) store.put(tiddler) user = User(user_name) user.set_password(user_pass) user.note = user_note for role in user_roles: user.add_role(role) store.put(user) bags = [bag.name for bag in store.list_bags()] recipes = [recipe.name for recipe in store.list_recipes()] users = [user.usersign for user in store.list_users()] assert len(bags) == RANGE assert len(recipes) == RANGE assert len(users) == RANGE for x in xrange(RANGE): bname = 'bag%s' % x rname = 'recipe%s' % x uname = 'user%s' % x assert bname in bags assert rname in recipes assert uname in users tiddler = store.get(Tiddler(u'tiddler0', u'bag0')) assert tiddler.fields['field0'] == 'field0' assert tiddler.fields['fieldone0'] == 'fieldone0' bag = Bag(u'bag0') bag = store.get(bag) tiddlers = [] for tiddler in store.list_bag_tiddlers(bag): tiddlers.append(store.get(tiddler)) assert len(tiddlers) == 1 assert tiddlers[0].title == 'tiddler0' assert tiddlers[0].fields['field0'] == 'field0' assert tiddlers[0].fields['fieldone0'] == 'fieldone0' assert tiddlers[0].tags == ['tag0'] assert sorted(bag.policy.read) == ['andextra', 'hi0'] assert sorted(bag.policy.manage) == ['R:hi0', u'andmanage'] assert bag.policy.owner == 'owner0' user = User(u'user1') user = store.get(user) assert user.usersign == 'user1' assert user.check_password('pass1') assert user.note == 'note1' assert 'role1' in user.list_roles() assert 'rolehold' in user.list_roles() recipe = Recipe(u'recipe2') recipe = store.get(recipe) assert recipe.name == 'recipe2' bags = [bag_name for bag_name, filter in recipe.get_recipe()] assert len(bags) == 1 assert 'bag2' in bags assert sorted(recipe.policy.read) == ['andextra', 'hi2'] assert sorted(recipe.policy.manage) == ['R:hi2', u'andmanage'] assert recipe.policy.owner == 'owner2' recipe.policy.manage = [u'andmanage'] store.put(recipe) recipe = Recipe (u'recipe2') recipe = store.get(recipe) assert recipe.policy.manage == [u'andmanage'] # delete the above things store.delete(bag) py.test.raises(NoBagError, 'store.delete(bag)') py.test.raises(NoBagError, 'store.get(bag)') store.delete(recipe) py.test.raises(NoRecipeError, 'store.delete(recipe)') py.test.raises(NoRecipeError, 'store.get(recipe)') store.delete(user) py.test.raises(NoUserError, 'store.delete(user)') py.test.raises(NoUserError, 'store.get(user)') tiddler = Tiddler(u'tiddler9', u'bag9') store.get(tiddler) assert tiddler.bag == 'bag9' assert tiddler.text == 'hey ho 9' assert tiddler.tags == ['tag9'] assert tiddler.fields['field9'] == 'field9' assert 'server.host' not in tiddler.fields store.delete(tiddler) py.test.raises(NoTiddlerError, 'store.delete(tiddler)') py.test.raises(NoTiddlerError, 'store.get(tiddler)')
% exc) try: user_info = simplejson.loads(content) old_password = user_info['old_password'] new_password = user_info['password'] except (ValueError, KeyError), exc: raise HTTP400('Invalid input, %s' % exc) try: user = User(target_user) try: user = store.get(user) except NoUserError: raise HTTP404() if user.check_password(old_password): user.set_password(new_password) else: raise HTTP400('Old password incorrect') except KeyError, exc: raise HTTP400('Missing required data: %s', exc) store.put(user) start_response('204 No Content', [ ('Content-Type', 'text/html; charset=UTF-8')]) return ['Updated %s' % target_user] def post_user(environ, start_response): """ Create a new user through a JSON POST to /users.
def test_adduser(): handle(['', u'adduser', u'cdent', u'crunk']) the_user = User('cdent') the_user = store.get(the_user) assert the_user.check_password('crunk')
def test_empty_password(): user = User('ape') assert not user.check_password('xow'), 'no password on user returns false' assert not user.check_password('') user.set_password('') assert not user.check_password('')
def test_user_password(): user = User('monkey') user.set_password('cowpig') assert user.check_password('cowpig'), 'correct password returns true' assert not user.check_password('pigcow'), 'bad password returns false'
def test_userpass(): handle(['', u'userpass', u'cdent', u'drunk']) the_user = User('cdent') the_user = store.get(the_user) assert the_user.check_password('drunk')
def test_user_password(): user = User('monkey') user.set_password('cowpig') assert user.check_password('cowpig'), 'correct password returns true' assert not user.check_password('pigcow'), 'bad password returns false'
def test_empty_password(): user = User('ape') assert not user.check_password('xow'), 'no password on user returns false' assert not user.check_password('') user.set_password('') assert not user.check_password('')
def test_make_a_bunch(): for x in xrange(RANGE): bag_name = u'bag%s' % x recipe_name = u'recipe%s' % x tiddler_name = u'tiddler%s' % x recipe_list = [(bag_name, '')] tiddler_text = u'hey ho %s' % x field_name = u'field%s' % x field_name2 = u'fieldone%s' % x tag_name = u'tag%s' % x user_name = u'user%s' % x user_pass = u'pass%s' % x user_note = u'note%s' % x user_roles = [u'rolehold', u'role%s' % x] bag = Bag(bag_name) bag.policy.owner = u'owner%s' % x bag.policy.read = [u'hi%s' % x, u'andextra'] bag.policy.manage = [u'R:hi%s' % x, u'andmanage'] store.put(bag) recipe = Recipe(recipe_name) recipe.policy.owner = u'owner%s' % x recipe.policy.read = [u'hi%s' % x, u'andextra'] recipe.policy.manage = [u'R:hi%s' % x, u'andmanage'] recipe.set_recipe(recipe_list) store.put(recipe) tiddler = Tiddler(tiddler_name, bag_name) tiddler.text = tiddler_text tiddler.fields[field_name] = field_name tiddler.fields[field_name2] = field_name2 tiddler.fields['server.host'] = 'gunky' tiddler.tags = [tag_name] store.put(tiddler) store.put(tiddler) user = User(user_name) user.set_password(user_pass) user.note = user_note for role in user_roles: user.add_role(role) store.put(user) bags = [bag.name for bag in store.list_bags()] recipes = [recipe.name for recipe in store.list_recipes()] users = [user.usersign for user in store.list_users()] assert len(bags) == RANGE assert len(recipes) == RANGE assert len(users) == RANGE for x in xrange(RANGE): bname = 'bag%s' % x rname = 'recipe%s' % x uname = 'user%s' % x assert bname in bags assert rname in recipes assert uname in users tiddler = store.get(Tiddler(u'tiddler0', u'bag0')) assert tiddler.fields[u'field0'] == u'field0' assert tiddler.fields[u'fieldone0'] == u'fieldone0' bag = Bag(u'bag0') bag = store.get(bag) tiddlers = [] for tiddler in store.list_bag_tiddlers(bag): tiddlers.append(store.get(tiddler)) assert len(tiddlers) == 1 assert tiddlers[0].title == 'tiddler0' assert tiddlers[0].fields['field0'] == 'field0' assert tiddlers[0].fields['fieldone0'] == 'fieldone0' assert tiddlers[0].tags == ['tag0'] assert sorted(bag.policy.read) == ['andextra', 'hi0'] assert sorted(bag.policy.manage) == ['R:hi0', u'andmanage'] assert bag.policy.owner == 'owner0' user = User(u'user1') user = store.get(user) assert user.usersign == 'user1' assert user.check_password('pass1') assert user.note == 'note1' assert 'role1' in user.list_roles() assert 'rolehold' in user.list_roles() recipe = Recipe(u'recipe2') recipe = store.get(recipe) assert recipe.name == 'recipe2' bags = [bag_name for bag_name, filter in recipe.get_recipe()] assert len(bags) == 1 assert 'bag2' in bags assert sorted(recipe.policy.read) == ['andextra', 'hi2'] assert sorted(recipe.policy.manage) == ['R:hi2', u'andmanage'] assert recipe.policy.owner == 'owner2' recipe.policy.manage = [u'andmanage'] store.put(recipe) recipe = Recipe(u'recipe2') recipe = store.get(recipe) assert recipe.policy.manage == [u'andmanage'] # delete the above things store.delete(bag) py.test.raises(NoBagError, 'store.delete(bag)') py.test.raises(NoBagError, 'store.get(bag)') store.delete(recipe) py.test.raises(NoRecipeError, 'store.delete(recipe)') py.test.raises(NoRecipeError, 'store.get(recipe)') store.delete(user) py.test.raises(NoUserError, 'store.delete(user)') py.test.raises(NoUserError, 'store.get(user)') tiddler = Tiddler(u'tiddler9', u'bag9') store.get(tiddler) assert tiddler.bag == 'bag9' assert tiddler.text == 'hey ho 9' assert tiddler.tags == ['tag9'] assert tiddler.fields['field9'] == 'field9' assert 'server.host' not in tiddler.fields store.delete(tiddler) py.test.raises(NoTiddlerError, 'store.delete(tiddler)') py.test.raises(NoTiddlerError, 'store.get(tiddler)')
def test_userpass(): handle(['', u'userpass', u'cdent', u'drunk']) the_user = User('cdent') the_user = store.get(the_user) assert the_user.check_password('drunk')
def test_make_a_bunch(): for x in xrange(RANGE): bag_name = u"bag%s" % x recipe_name = u"recipe%s" % x tiddler_name = u"tiddler%s" % x recipe_list = [(bag_name, "")] tiddler_text = u"hey ho %s" % x field_name = u"field%s" % x tag_name = u"tag%s" % x user_name = u"user%s" % x user_pass = u"pass%s" % x user_note = u"note%s" % x user_roles = [u"rolehold", u"role%s" % x] bag = Bag(bag_name) bag.policy.owner = u"owner%s" % x bag.policy.read = [u"hi%s" % x, u"andextra"] bag.policy.manage = [u"R:hi%s" % x, u"andmanage"] store.put(bag) recipe = Recipe(recipe_name) recipe.policy.owner = u"owner%s" % x recipe.policy.read = [u"hi%s" % x, u"andextra"] recipe.policy.manage = [u"R:hi%s" % x, u"andmanage"] recipe.set_recipe(recipe_list) store.put(recipe) tiddler = Tiddler(tiddler_name, bag_name) tiddler.text = tiddler_text tiddler.fields[field_name] = field_name tiddler.fields["server.host"] = u"gunky" tiddler.tags = [tag_name] store.put(tiddler) user = User(user_name) user.set_password(user_pass) user.note = user_note for role in user_roles: user.add_role(role) store.put(user) bags = [bag.name for bag in store.list_bags()] recipes = [recipe.name for recipe in store.list_recipes()] users = [user.usersign for user in store.list_users()] assert len(bags) == RANGE assert len(recipes) == RANGE assert len(users) == RANGE for x in xrange(RANGE): bname = u"bag%s" % x rname = u"recipe%s" % x uname = u"user%s" % x assert bname in bags assert rname in recipes assert uname in users bag = Bag("bag0") bag = store.get(bag) tiddlers = [] for tiddler in store.list_bag_tiddlers(bag): tiddlers.append(store.get(tiddler)) assert len(tiddlers) == 1 assert tiddlers[0].title == "tiddler0" assert tiddlers[0].fields["field0"] == "field0" assert tiddlers[0].tags == ["tag0"] assert sorted(bag.policy.read) == ["andextra", "hi0"] assert sorted(bag.policy.manage) == ["R:hi0", "andmanage"] assert bag.policy.owner == "owner0" bag = Bag("bag0") bag = store.get(bag) bag.policy.read.remove("hi0") store.put(bag) bag = Bag("bag0") bag = store.get(bag) assert bag.policy.read == [u"andextra"] bag = Bag("bag0") bag = store.get(bag) bag.policy.read.append(u"hi0") store.put(bag) bag = Bag("bag0") bag = store.get(bag) assert sorted(bag.policy.read) == ["andextra", "hi0"] user = User("user1") user = store.get(user) assert user.usersign == "user1" assert user.check_password("pass1") assert user.note == "note1" assert "role1" in user.list_roles() assert "rolehold" in user.list_roles() recipe = Recipe("recipe2") recipe = store.get(recipe) assert recipe.name == "recipe2" bags = [bag_name for bag_name, filter in recipe.get_recipe()] assert len(bags) == 1 assert "bag2" in bags assert sorted(recipe.policy.read) == ["andextra", "hi2"] assert sorted(recipe.policy.manage) == ["R:hi2", "andmanage"] assert recipe.policy.owner == "owner2" recipe.policy.manage = [u"andmanage"] store.put(recipe) recipe = Recipe("recipe2") recipe = store.get(recipe) assert recipe.policy.manage == ["andmanage"] # delete the above things store.delete(bag) py.test.raises(NoBagError, "store.delete(bag)") py.test.raises(NoBagError, "store.get(bag)") store.delete(recipe) py.test.raises(NoRecipeError, "store.delete(recipe)") py.test.raises(NoRecipeError, "store.get(recipe)") store.delete(user) py.test.raises(NoUserError, "store.delete(user)") py.test.raises(NoUserError, "store.get(user)") tiddler = Tiddler("tiddler9", "bag9") store.get(tiddler) assert tiddler.bag == "bag9" assert tiddler.text == "hey ho 9" assert tiddler.tags == ["tag9"] assert tiddler.fields["field9"] == "field9" assert "server.host" not in tiddler.fields store.delete(tiddler) py.test.raises(NoTiddlerError, "store.delete(tiddler)") py.test.raises(NoTiddlerError, "store.get(tiddler)")