コード例 #1
0
def test_category_new():
    facebookid = "*****@*****.**"
    account = Account.get_by_facebookid(facebookid)
    key_name = "TOEIC"
    category = Category.new(key_name, account)
    assert None != category
    return
コード例 #2
0
def test_category_new():
	facebookid = "*****@*****.**"
	account = Account.get_by_facebookid(facebookid)
	key_name = "TOEIC"
	category = Category.new(key_name,account)
	assert None != category
	return
コード例 #3
0
ファイル: category.py プロジェクト: zedoul/storyengine-gae
	def post(self): 
		accountid = self.session.get('accountid')
		account = Account.get_by_accountid(accountid)
		if 1 != account.mod:
			return

		key_name = self.request.get('key_name')
		assert(None!=re.match('^[A-Z0-9]+', key_name))
		category = Category.new(key_name,account)
		params = {}
		for key in self.request.arguments():
			params[key] = self.request.get(key)
		category.setter(params)
		self.redirect('/category')
コード例 #4
0
ファイル: category.py プロジェクト: zedoul/storyengine-gae
    def post(self):
        accountid = self.session.get('accountid')
        account = Account.get_by_accountid(accountid)
        if 1 != account.mod:
            return

        key_name = self.request.get('key_name')
        assert (None != re.match('^[A-Z0-9]+', key_name))
        category = Category.new(key_name, account)
        params = {}
        for key in self.request.arguments():
            params[key] = self.request.get(key)
        category.setter(params)
        self.redirect('/category')