コード例 #1
0
ファイル: hitcount_tests.py プロジェクト: XFJH/Shakal-NG
	def setUp(self):
		self.OLD_TEMPLATES = settings.TEMPLATES
		settings.TEMPLATES = (('desktop', ('default',),),)
		category = Category(name = "t", slug = "t")
		category.save()
		article = Article()
		article.category = category
		article.published = True
		article.title = "Article title"
		article.slug = "article"
		article.save()
		self.article = article
		self.browser = webdriver.Firefox()
		self.browser.implicitly_wait(5)
コード例 #2
0
ファイル: tests.py プロジェクト: XFJH/Shakal-NG
	def create_article_instance(self):
		article = Article()
		article.title = "title"
		article.slug = "slug"
		article.category = Category.objects.all()[0]
		article.perex = "perex"
		article.annotation = "annotation"
		article.authors_name = "author"
		article.published = True
		article.top = False
		article.pub_time = now()
		article.updated = now()
		article.content = "content"
		return article