def test_topicsread(topic, user):
 topicsread = TopicsRead()
 topicsread.user_id = user.id
 topicsread.topic_id = topic.id
 topicsread.forum_id = topic.forum_id
 topicsread.last_read = datetime.utcnow()
 topicsread.save()
 assert (topicsread is not None)
 topicsread.delete()
 topicsread = TopicsRead.query.filter_by(topic_id=topicsread.topic_id).first()
 assert (topicsread is None)

def test_topicsread ( topic , user ) : topicsread = TopicsRead ( ) topicsread . user_id = user . id topicsread . topic_id = topic . id topicsread . forum_id = topic . forum_id topicsread . last_read = datetime . utcnow ( ) topicsread . save ( ) assert ( topicsread is not None ) topicsread . delete ( ) topicsread = TopicsRead . query . filter_by ( topic_id = topicsread . topic_id ) . first ( ) assert ( topicsread is None )
tests if the topicsread trakcer can be saved/edited and deleted with the implemented save and delete methods .