def test_query_by_id(self):
        self.add_message()
        self.add_P2C()
        a = MPost2Catalog.query_by_id(self.post_id)

        assert a[0].tag_id == self.tag_id
        self.tearDown()
Beispiel #2
0
 def tearDown(self):
     print("function teardown")
     tt = MCategory.get_by_uid(self.uid)
     if tt:
         MCategory.delete(self.uid)
     tt = MPost.get_by_uid(self.postid)
     if tt:
         MPost.delete(self.postid)
         # a=MPost2Catalog.query_by_post(self.postid)
         # a=MPost2Catalog.query_by_entity_uid(self.postid)
         # print(a.count())
         #
         # MPost2Catalog.del_by_uid(a[0].uid)
     tt = MPost2Catalog.query_by_id(self.uid)
     if tt:
         MPost2Catalog.del_by_uid(self.uid)
Beispiel #3
0
 def tearDown(self):
     print("function teardown")
     tt = MPost2Catalog.query_by_id(self.uid)
     if tt:
         MPost2Catalog.del_by_uid(self.uid)
Beispiel #4
0
 def test_query_by_id(self):
     MPost2Catalog.query_by_id(self.uid)
     assert True