コード例 #1
0
ファイル: test_templatetags.py プロジェクト: whit/ella
 def test_minimal_args(self):
     count, var_name, days, mods = top_visited_parser(
         ['top_visited', '1', 'as', 'var'])
     self.assert_equals(1, count)
     self.assert_equals('var', var_name)
     self.assert_equals(None, days)
     self.assert_equals([], mods)
コード例 #2
0
ファイル: test_templatetags.py プロジェクト: whit/ella
 def test_more_models(self):
     from ella.articles.models import Article
     from ella.galleries.models import Gallery
     count, var_name, days, mods = top_visited_parser([
         'top_visited', '1', 'articles.article', 'galleries.gallery', 'as',
         'var'
     ])
     self.assert_equals([Article, Gallery], mods)
コード例 #3
0
ファイル: test_templatetags.py プロジェクト: Almad/ella
 def test_more_models(self):
     from ella.articles.models import Article
     from ella.galleries.models import Gallery
     count, var_name, days, mods = top_visited_parser(['top_visited', '1', 'articles.article', 'galleries.gallery', 'as', 'var'])
     self.assert_equals([Article, Gallery], mods)
コード例 #4
0
ファイル: test_templatetags.py プロジェクト: Almad/ella
 def test_one_model(self):
     from ella.articles.models import Article
     count, var_name, days, mods = top_visited_parser(['top_visited', '1', 'articles.article', 'as', 'var'])
     self.assert_equals([Article], mods)
コード例 #5
0
ファイル: test_templatetags.py プロジェクト: Almad/ella
 def test_days(self):
     count, var_name, days, mods = top_visited_parser(['top_visited', '1', 'days', '7', 'as', 'var'])
     self.assert_equals(7, days)
コード例 #6
0
ファイル: test_templatetags.py プロジェクト: Almad/ella
 def test_minimal_args(self):
     count, var_name, days, mods = top_visited_parser(['top_visited', '1', 'as', 'var'])
     self.assert_equals(1, count)
     self.assert_equals('var', var_name)
     self.assert_equals(None, days)
     self.assert_equals([], mods)
コード例 #7
0
ファイル: test_templatetags.py プロジェクト: whit/ella
 def test_one_model(self):
     from ella.articles.models import Article
     count, var_name, days, mods = top_visited_parser(
         ['top_visited', '1', 'articles.article', 'as', 'var'])
     self.assert_equals([Article], mods)
コード例 #8
0
ファイル: test_templatetags.py プロジェクト: whit/ella
 def test_days(self):
     count, var_name, days, mods = top_visited_parser(
         ['top_visited', '1', 'days', '7', 'as', 'var'])
     self.assert_equals(7, days)