コード例 #1
0
ファイル: test_view_helpers.py プロジェクト: dedaluz/ella
    def test_returns_correct_context(self):
        c = _object_detail(*self.correct_args)

        self.assert_equals(5, len(c.keys()))
        self.assert_equals(self.publishable, c['object'])
        self.assert_equals(self.placement, c['placement'])
        self.assert_equals(self.category_nested, c['category'])
        self.assert_equals('articles', c['content_type_name'])
        self.assert_equals(self.publishable.content_type, c['content_type'])
コード例 #2
0
ファイル: test_view_helpers.py プロジェクト: dedaluz/ella
    def test_matches_static_placement_if_date_is_not_supplied(self):
        self.placement.static = True
        self.placement.save()
        self.correct_args = self.correct_args[:4]

        c = _object_detail(*self.correct_args)

        self.assert_equals(5, len(c.keys()))
        self.assert_equals(self.publishable, c['object'])
        self.assert_equals(self.placement, c['placement'])
        self.assert_equals(self.category_nested, c['category'])
        self.assert_equals('articles', c['content_type_name'])
        self.assert_equals(self.publishable.content_type, c['content_type'])