コード例 #1
0
    def test_just_query_all(self):
        self.add_message()
        self.add_P2C()
        a = MPost2Catalog.just_query_all()
        TF = False

        for i in a:
            if i.post_id == self.post_id:
                TF = True

        assert TF
        self.tearDown()
コード例 #2
0
from torcms.model.post2catalog_model import MPost2Catalog
from torcms.model.post_model import MPost

all_post2tag_recs = MPost2Catalog.just_query_all()

for post2tag_rec in all_post2tag_recs:
    post_id = post2tag_rec.post_id
    tag_id  = post2tag_rec.tag_id
    test_select = MPost.get_by_uid(post_id)
    if test_select:
        pass
    else:
        print(post_id)
        MPost2Catalog.del_by_uid(post2tag_rec.uid)
コード例 #3
0
ファイル: test_post2catalog.py プロジェクト: brucehe3/TorCMS
 def test_just_query_all(self):
     MPost2Catalog.just_query_all()
     assert True