def insertRuleset(self, ruleset, domain):
		'''增加一个robots.txt规则集'''
		cur = self.conn.cursor()
		cur.execute("SELECT did FROM Domains WHERE domain=?", (domain,))
		did = cur.fetchone()[0]
		cur.execute("INSERT INTO Rulesets VALUES (NULL,?,?)",(did, ruleset))
		# 写入到文件
		self.conn.commit()
def step_impl(context, user_names_str):
    if not hasattr(context, 'users'):
        context.users = {}

    user_names = [name.strip() for name in re.split('and|,', user_names_str)]
    for user_name in user_names:
        token = 'fake_token_' + user_name
        user_id = context.helpers.create_test_user(user_name, token)
        context.users[user_name] = {'token': token, 'id': user_id}