def test_forumsread(topic, user):
 forumsread = ForumsRead()
 forumsread.user_id = user.id
 forumsread.forum_id = topic.forum_id
 forumsread.last_read = datetime.utcnow()
 forumsread.save()
 assert (forumsread is not None)
 forumsread.delete()
 forumsread = ForumsRead.query.filter_by(forum_id=forumsread.forum_id).first()
 assert (forumsread is None)

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